Implement OEMCrypto_LoadCasECMKeys() with TODO WTPIs

Add function body of OEMCrypto_LoadCasECMKeys() with a few TODOs. At the
end, Cas content keys and IVs shall be installed to key slot by WTPIs,
which will be declared in the next CL.

Test: opk_ta
Bug: 241146324
Merged from https://widevine-internal-review.googlesource.com/169378

Merged from https://widevine-internal-review.googlesource.com/178139

Change-Id: Idf3930ec916e95012067741e46254018fc6e4381
This commit is contained in:
Cong Lin
2023-03-23 10:31:50 -07:00
committed by Robert Shih
parent 695b204545
commit 9d97c2bf60
2 changed files with 4 additions and 4 deletions

View File

@@ -1367,8 +1367,8 @@ void EntitledMessage::LoadCasKeys(bool load_even, bool load_odd,
// Convert the OEMCrypto_EntitledContentKeyObject to
// OEMCrypto_EntitledCasKeyObject. Only the first two key object is used.
OEMCrypto_EntitledContentKeyObject even_key;
OEMCrypto_EntitledContentKeyObject odd_key;
OEMCrypto_EntitledContentKeyObject even_key = {};
OEMCrypto_EntitledContentKeyObject odd_key = {};
bool has_even = load_even && num_keys_ >= 1;
bool has_odd = load_odd && num_keys_ >= 2;
if (has_even) {

View File

@@ -634,9 +634,9 @@ class EntitledMessage {
uint32_t num_keys_;
// Clear Entitlement key data. This is the backing data for
// |entitled_key_array_|.
EntitledContentKeyData entitled_key_data_[kMaxNumKeys];
EntitledContentKeyData entitled_key_data_[kMaxNumKeys] = {};
// Entitled key object. Pointers are backed by |entitled_key_data_|.
OEMCrypto_EntitledContentKeyObject entitled_key_array_[kMaxNumKeys];
OEMCrypto_EntitledContentKeyObject entitled_key_array_[kMaxNumKeys] = {};
uint32_t entitled_key_session_;
};