Added support for additional HDCP levels.

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

OEMCrypto v17 introduced several new HDCP levels that OEMCrypto may
report; however, the CDM never updated to support them.  The enum
values of the additional levels are no longer sequential with their
level of support (v1.1 is 7, and v2.1 is 3), this requires more
considerations when comparing the required HDCP levels (as specified
by the license) and current HDCP level supported by OEMCrypto.

The following rules were used:
1) HDCP_NONE is the absolute lowest level
2) HDCP_NO_DIGITAL_OUTPUT is the absolute highest level
3) HDCP_V1 is treated as equal to all V1.x levels
4) All other versions are based on their major-minor pairs

Bug: 269671291
Test: license_unittest
Test: policy_engine_constraints_unittest
Test: policy_engine_unittest
Test: GtsMediaTestCases
Change-Id: Ibecfcb981d7e019c68cb8e0c7286222253d18369
This commit is contained in:
Alex Dale
2023-03-30 23:11:28 -07:00
parent f1272a7e35
commit 6cbd75bb6c
7 changed files with 91 additions and 51 deletions

View File

@@ -415,8 +415,6 @@ class CdmEngine {
void OnKeyReleaseEvent(const CdmKeySetId& key_set_id);
std::string MapHdcpVersion(CryptoSession::HdcpCapability version);
void CloseExpiredReleaseSessions();
// Returns "true" if |okp_provisioner_| should be checked.

View File

@@ -155,12 +155,12 @@ class LicenseKeyStatus {
void SetConstraints(const ConstraintList& constraints);
bool is_content_key_;
CdmKeyStatus key_status_;
bool meets_constraints_;
bool meets_security_level_constraints_;
bool is_content_key_ = false;
CdmKeyStatus key_status_ = kKeyStatusInternalError;
bool meets_constraints_ = true;
bool meets_security_level_constraints_ = true;
CdmKeyAllowedUsage allowed_usage_;
CryptoSession::HdcpCapability default_hdcp_level_;
CryptoSession::HdcpCapability default_hdcp_level_ = HDCP_NONE;
ConstraintList constraints_;
CORE_DISALLOW_COPY_AND_ASSIGN(LicenseKeyStatus);

View File

@@ -142,6 +142,11 @@ static const std::string QUERY_VALUE_HDCP_V2_0 = "HDCP-2.0";
static const std::string QUERY_VALUE_HDCP_V2_1 = "HDCP-2.1";
static const std::string QUERY_VALUE_HDCP_V2_2 = "HDCP-2.2";
static const std::string QUERY_VALUE_HDCP_V2_3 = "HDCP-2.3";
static const std::string QUERY_VALUE_HDCP_V1_0 = "HDCP-1.0";
static const std::string QUERY_VALUE_HDCP_V1_1 = "HDCP-1.1";
static const std::string QUERY_VALUE_HDCP_V1_2 = "HDCP-1.2";
static const std::string QUERY_VALUE_HDCP_V1_3 = "HDCP-1.3";
static const std::string QUERY_VALUE_HDCP_V1_4 = "HDCP-1.4";
static const std::string QUERY_VALUE_HDCP_LEVEL_UNKNOWN = "HDCP-LevelUnknown";
static const std::string QUERY_VALUE_DRM_CERTIFICATE = "DrmCertificate";
static const std::string QUERY_VALUE_KEYBOX = "Keybox";