New CdmResponseType fields: oec_result & crypto_session_method
[ Merge of go/wvgerrit/163437 ] Bug: 253271674 Test: cdm unit tests Change-Id: I064e28af593e4a55c13d03115bb5181a879a1ed4
This commit is contained in:
@@ -155,7 +155,7 @@ void LicenseHolder::DecryptSecure(const KeyId& key_id) {
|
||||
}
|
||||
|
||||
void LicenseHolder::FailDecrypt(const KeyId& key_id,
|
||||
CdmResponseType expected_status) {
|
||||
CdmResponseEnum expected_status) {
|
||||
CdmResponseType status = Decrypt(key_id);
|
||||
// If the server knows we cannot handle the key, it would not have given us
|
||||
// the key. In that case, the status should indicate no key.
|
||||
|
||||
@@ -83,7 +83,7 @@ class LicenseHolder {
|
||||
// Try to decrypt some random data, but expect failure. The failure may
|
||||
// be either the expected_status, or NEED_KEY. We allow NEED_KEY in case
|
||||
// the server recognized that we cannot support the given key.
|
||||
void FailDecrypt(const KeyId& key_id, CdmResponseType expected_status);
|
||||
void FailDecrypt(const KeyId& key_id, CdmResponseEnum expected_status);
|
||||
|
||||
const std::string& content_id() const { return content_id_; }
|
||||
void set_content_id(const std::string& content_id) {
|
||||
|
||||
@@ -84,7 +84,7 @@ TEST_F(CorePIGTest, OfflineHWSecureRequired) {
|
||||
ASSERT_NO_FATAL_FAILURE(holder.LoadLicense());
|
||||
EXPECT_EQ(NO_ERROR, holder.Decrypt(sw_key_id));
|
||||
ASSERT_NO_FATAL_FAILURE(
|
||||
holder.FailDecrypt(hw_key_id, CdmResponseType(DECRYPT_ERROR)));
|
||||
holder.FailDecrypt(hw_key_id, DECRYPT_ERROR));
|
||||
// Next, if possible, we try to decrypt to a secure buffer, and verify
|
||||
// success.
|
||||
if (wvoec::global_features.test_secure_buffers) {
|
||||
@@ -100,7 +100,7 @@ TEST_F(CorePIGTest, OfflineHWSecureRequired) {
|
||||
ASSERT_NO_FATAL_FAILURE(holder.ReloadLicense());
|
||||
EXPECT_EQ(NO_ERROR, holder.Decrypt(sw_key_id));
|
||||
ASSERT_NO_FATAL_FAILURE(
|
||||
holder.FailDecrypt(hw_key_id, CdmResponseType(DECRYPT_ERROR)));
|
||||
holder.FailDecrypt(hw_key_id, DECRYPT_ERROR));
|
||||
// Next, if possible, we try to decrypt to a secure buffer, and verify
|
||||
// success.
|
||||
if (wvoec::global_features.test_secure_buffers) {
|
||||
|
||||
Reference in New Issue
Block a user