Usage Table for Level 3 OEMCrypto
This is a copy of the widevine CL. https://widevine-internal-review.googlesource.com/#/c/10174/ This CL adds the OEMCrypto v9 functionality to the level 3 haystack version of OEMCrypto. Mostly, this is to support usage tables. The code is feature complete, but the timing tests are a little flakey -- I'm not sure if the problem is in the code or if the test has too tight a tolerance. Also, the storage of the generation number needs to be made more secure. Change-Id: I73fecf8934b6a46785f1f8b6f40b40ffe39b88de
This commit is contained in:
@@ -814,7 +814,7 @@ extern "C" OEMCryptoResult OEMCrypto_DeleteUsageEntry(OEMCrypto_SESSION session,
|
||||
LevelSession pair = kAdapter->get(session);
|
||||
if (!pair.fcn) return OEMCrypto_ERROR_INVALID_SESSION;
|
||||
if( pair.fcn->version > 8 ) {
|
||||
return pair.fcn->DeleteUsageEntry(session, pst, pst_length, message,
|
||||
return pair.fcn->DeleteUsageEntry(pair.session, pst, pst_length, message,
|
||||
message_length, signature,
|
||||
signature_length);
|
||||
} else {
|
||||
|
||||
@@ -76,7 +76,7 @@ extern "C" OEMCryptoResult OEMCrypto_LoadKeys(
|
||||
const uint8_t* enc_mac_key_iv, const uint8_t* enc_mac_key, size_t num_keys,
|
||||
const OEMCrypto_KeyObject* key_array,
|
||||
const uint8_t* pst, size_t pst_length) {
|
||||
return OEMCrypto_LoadKeys_V8(session, message, message_length, signature,
|
||||
return OEMCrypto_LoadKeys_V8(pair.session, message, message_length, signature,
|
||||
signature_length, enc_mac_key_iv, enc_mac_key,
|
||||
num_keys, key_array);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user