Test Key Control Block with HDCP Version
This is a copy of the Widevine CL: https://widevine-internal-review.googlesource.com/#/c/9480/ This change is part of OEMCrypto API version 9. This CL adds verification that a key control block which requires a specific version of HDCP can be loaded. Also, if secure data path is not set, it verifies that data is still decrypted. This CL also adds test that verify DecryptCTR fails when the current HDCP version is below that in the key control block. The expected error is OEMCrypto_ERROR_INSUFFICIENT_HDCP. This error code is newly introduced in this CL. This is one attempt to clarify HDCP, as specified in b/13626021, and is a slight modification from previous behavior for the mock and the level 3 haystacked code. This CL also tests the two valid verification codes "kctl" and "kc09". bug: 13626021 Change-Id: If380709d2306a3489470b29fb148a45b609b089d
This commit is contained in:
@@ -248,6 +248,14 @@ class CryptoEngine {
|
||||
size_t cipher_data_length, bool is_encrypted,
|
||||
uint8_t* clear_data, BufferType buffer_type);
|
||||
|
||||
const OEMCrypto_HDCP_Capability current_hdcp_capability() {
|
||||
return local_display_ ? 0xFF : current_hdcp_capability_;
|
||||
}
|
||||
|
||||
const OEMCrypto_HDCP_Capability maximum_hdcp_capability() {
|
||||
return maximum_hdcp_capability_;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
bool valid_;
|
||||
@@ -256,6 +264,9 @@ class CryptoEngine {
|
||||
ActiveSessions sessions_;
|
||||
WvKeybox keybox_;
|
||||
wvcdm::Lock session_table_lock_;
|
||||
OEMCrypto_HDCP_Capability current_hdcp_capability_;
|
||||
OEMCrypto_HDCP_Capability maximum_hdcp_capability_;
|
||||
bool local_display_;
|
||||
|
||||
CORE_DISALLOW_COPY_AND_ASSIGN(CryptoEngine);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user