CDM Core: Removed support for v15 licenses.

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

OEMCrypto v15 licenses made use of several now-obsolete API functions
of OEMCrypto (mainly LoadKeys and RefreshKeys).  All license handled
by the CDM must be v16 or newer.  The CDM can now rely on all license
requests/responses containing a core message, using v16 policy timers,
and requires loading using LoadLicense() / LoadRenewal().

Bug: 252670759
Test: run_x86_64_tests and policy_engine_unittest
Change-Id: I3f65a6ec0326b4c89d1919b8911e065079cb90d2
This commit is contained in:
Alex Dale
2022-10-27 17:05:20 -07:00
parent 4a4ee80cad
commit b26126d3aa
8 changed files with 200 additions and 2301 deletions

View File

@@ -64,7 +64,6 @@ class PolicyEngine {
// being restored and transitions and notifications will be deferred until
// stored playback times are restored.
virtual void SetLicense(const video_widevine::License& license,
bool supports_core_messages,
bool defer_license_state_update);
// Used to update the currently loaded entitled content keys.
@@ -73,8 +72,7 @@ class PolicyEngine {
// SetLicenseForRelease is used when releasing a license. The keys in this
// license will be ignored, and any old keys will be expired.
virtual void SetLicenseForRelease(const video_widevine::License& license,
bool supports_core_messages);
virtual void SetLicenseForRelease(const video_widevine::License& license);
// Call this on first decrypt to set the start of playback.
virtual bool BeginDecryption(void);
@@ -169,8 +167,8 @@ class PolicyEngine {
void SetSecurityLevelForTest(CdmSecurityLevel security_level);
LicenseState license_state_;
int64_t license_state_update_deadline_;
LicenseState license_state_ = kLicenseStateInitial;
int64_t license_state_update_deadline_ = 0;
// This is the license id field from server response. This data gets passed
// back to the server in each renewal request. When we get a renewal response
@@ -178,11 +176,11 @@ class PolicyEngine {
video_widevine::LicenseIdentification license_id_;
// to assist in clock rollback checks
int64_t last_recorded_current_time_;
int64_t last_recorded_current_time_ = 0;
// Used to dispatch CDM events.
CdmSessionId session_id_;
WvCdmEventListener* event_listener_;
WvCdmEventListener* event_listener_ = nullptr;
// Keys associated with license - holds allowed usage, usage constraints,
// and current status (CdmKeyStatus)
@@ -193,9 +191,9 @@ class PolicyEngine {
video_widevine::License::Policy policy_;
// Device checks
int64_t next_device_check_;
uint32_t current_resolution_;
CryptoSession* crypto_session_;
int64_t next_device_check_ = 0;
uint32_t current_resolution_ = 0;
CryptoSession* crypto_session_ = nullptr;
std::unique_ptr<PolicyTimers> policy_timers_;
std::unique_ptr<wvutil::Clock> clock_;