Merge changes I9f51e07c,I3f65a6ec
* changes: CDM core: Removed support for v15 provisioning responses. CDM Core: Removed support for v15 licenses.
This commit is contained in:
@@ -50,8 +50,6 @@ class CertificateProvisioning {
|
||||
wvutil::FileSystem* file_system, const CdmProvisioningResponse& response,
|
||||
std::string* cert, std::string* wrapped_key);
|
||||
|
||||
bool supports_core_messages() const { return supports_core_messages_; }
|
||||
|
||||
// Helper methods
|
||||
|
||||
// Extract serial number and system ID from a DRM Device certificate.
|
||||
@@ -123,13 +121,6 @@ class CertificateProvisioning {
|
||||
// Key type of the generated key pair in provisioning 4.
|
||||
CryptoWrappedKey::Type provisioning_40_key_type_;
|
||||
|
||||
// Indicates whether OEMCrypto supports core messages, and whether the
|
||||
// CDM should expect a core message in the response. This is primarily
|
||||
// used to distinguish between v16+ OEMCrypto or an earlier version.
|
||||
// Assume core messages are supported, and check if OEMCrypto populates
|
||||
// the core message field when calling PrepAndSignProvisioningRequest().
|
||||
bool supports_core_messages_ = true;
|
||||
|
||||
CORE_DISALLOW_COPY_AND_ASSIGN(CertificateProvisioning);
|
||||
};
|
||||
|
||||
|
||||
@@ -155,15 +155,6 @@ class CryptoSession {
|
||||
const std::string& message, std::string* core_message,
|
||||
std::string* signature);
|
||||
virtual CdmResponseType UseSecondaryKey(bool dual_key);
|
||||
// V15 licenses.
|
||||
virtual CdmResponseType LoadKeys(const std::string& message,
|
||||
const std::string& signature,
|
||||
const std::string& mac_key_iv,
|
||||
const std::string& mac_key,
|
||||
const std::vector<CryptoKey>& key_array,
|
||||
const std::string& provider_session_token,
|
||||
const std::string& srm_requirement,
|
||||
CdmLicenseKeyType key_type);
|
||||
// V16 licenses.
|
||||
virtual CdmResponseType LoadLicense(const std::string& signed_message,
|
||||
const std::string& core_message,
|
||||
@@ -174,10 +165,6 @@ class CryptoSession {
|
||||
virtual CdmResponseType PrepareAndSignRenewalRequest(
|
||||
const std::string& message, std::string* core_message,
|
||||
std::string* signature);
|
||||
// V15 licenses.
|
||||
virtual CdmResponseType RefreshKeys(const std::string& message,
|
||||
const std::string& signature,
|
||||
const std::vector<CryptoKey>& key_array);
|
||||
// V16 licenses.
|
||||
virtual CdmResponseType LoadRenewal(const std::string& signed_message,
|
||||
const std::string& core_message,
|
||||
|
||||
@@ -82,10 +82,6 @@ class CdmLicense {
|
||||
|
||||
virtual bool is_offline() const { return is_offline_; }
|
||||
|
||||
virtual bool supports_core_messages() const {
|
||||
return supports_core_messages_;
|
||||
}
|
||||
|
||||
virtual const VersionInfo& GetServiceVersion() {
|
||||
return latest_service_version_;
|
||||
}
|
||||
@@ -110,8 +106,7 @@ class CdmLicense {
|
||||
|
||||
CdmResponseType HandleContentKeyResponse(
|
||||
bool is_restore, const std::string& msg, const std::string& core_message,
|
||||
const std::string& signature, const std::string& mac_key_iv,
|
||||
const std::string& mac_key, const std::vector<CryptoKey>& key_array,
|
||||
const std::string& signature, const std::vector<CryptoKey>& key_array,
|
||||
const video_widevine::License& license);
|
||||
|
||||
// HandleEntitlementKeyResponse loads the entitlement keys in |key_array| into
|
||||
@@ -119,8 +114,7 @@ class CdmLicense {
|
||||
// |wrapped_keys_| and loads them for use.
|
||||
CdmResponseType HandleEntitlementKeyResponse(
|
||||
bool is_restore, const std::string& msg, const std::string& core_message,
|
||||
const std::string& signature, const std::string& mac_key_iv,
|
||||
const std::string& mac_key, const std::vector<CryptoKey>& key_array,
|
||||
const std::string& signature, const std::vector<CryptoKey>& key_array,
|
||||
const video_widevine::License& license);
|
||||
|
||||
// Prepare to reload a key update message. Some special code is needed to work
|
||||
@@ -146,11 +140,6 @@ class CdmLicense {
|
||||
std::string provider_session_token_;
|
||||
bool renew_with_client_id_;
|
||||
bool is_offline_;
|
||||
// Indicates whether the license contains / supports OEMCrypto-level
|
||||
// support for core messages. If the original license was created before
|
||||
// upgrading from V15, or if the licensing server is still running V15,
|
||||
// then the license does not support core messages.
|
||||
bool supports_core_messages_;
|
||||
|
||||
// Associated with ClientIdentification encryption
|
||||
bool use_privacy_mode_;
|
||||
|
||||
@@ -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_;
|
||||
|
||||
Reference in New Issue
Block a user