Remove error OEMCrypto_KEY_NOT_LOADED
Merge from master branch of Widevine repo of http://go/wvgerrit/66066 Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/63628 The error code OEMCrypto_KEY_NOT_LOADED is redundant with OEMCrypto_ERROR_NO_CONTENT_KEY and OEMCrypto_KEY_NOT_ENTITLED. The function LoadEntitledContentKey should return KEY_NOT_ENTITLED if it does not find the corresponding entitlement key in its key table. All other functions that do not find a key id in the key table should return OEMCrypto_ERROR_NO_CONTENT_KEY. This includes QueryKeyControl, SelectKey, and RefreshKeys. Test: unit tests Test: tested as part of http://go/ag/5501993 Bug: 115574797 Change-Id: Ida2111f32e331b99f3f0c77fa404a42654d0870c
This commit is contained in:
@@ -120,7 +120,7 @@ TEST_F(WvGenericOperationsTest, GenericEncryptNoKey) {
|
||||
cdm_sts = cdm_engine_.GenericEncrypt(
|
||||
holder_.session_id(), in_buffer_, key_id, iv_,
|
||||
wvcdm::kEncryptionAlgorithmAesCbc128, &out_buffer);
|
||||
EXPECT_EQ(NO_CONTENT_KEY_3, cdm_sts);
|
||||
EXPECT_EQ(NO_CONTENT_KEY_2, cdm_sts);
|
||||
EXPECT_NE(encrypted, out_buffer);
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ TEST_F(WvGenericOperationsTest, GenericDecryptNoKey) {
|
||||
cdm_sts = cdm_engine_.GenericDecrypt(
|
||||
holder_.session_id(), in_buffer_, key_id, iv_,
|
||||
wvcdm::kEncryptionAlgorithmAesCbc128, &out_buffer);
|
||||
EXPECT_EQ(NO_CONTENT_KEY_3, cdm_sts);
|
||||
EXPECT_EQ(NO_CONTENT_KEY_2, cdm_sts);
|
||||
EXPECT_NE(decrypted, out_buffer);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user