OEMCrypto Backwards Compatible Usage Table
Merge from widevine of http://go/wvgerrit/23283 This CL adds the backwards compatiblity functions to the new usage tables in the oemcrypto mock reference code. b/31458046 b/32554171 Change-Id: I04901d95aceb8910406f7c514c26c29c2c575322
This commit is contained in:
@@ -1015,7 +1015,10 @@ OEMCryptoResult SessionContext::UpdateUsageEntry(uint8_t* header_buffer,
|
||||
size_t* header_buffer_length,
|
||||
uint8_t* entry_buffer,
|
||||
size_t* entry_buffer_length) {
|
||||
if (!usage_entry_) return OEMCrypto_ERROR_INVALID_CONTEXT;
|
||||
if (!usage_entry_) {
|
||||
LOGE("UpdateUsageEntry: Session has no entry.");
|
||||
return OEMCrypto_ERROR_INVALID_CONTEXT;
|
||||
}
|
||||
return ce_->usage_table().UpdateUsageEntry(this, usage_entry_, header_buffer,
|
||||
header_buffer_length, entry_buffer,
|
||||
entry_buffer_length);
|
||||
@@ -1043,7 +1046,7 @@ OEMCryptoResult SessionContext::MoveEntry(uint32_t new_index) {
|
||||
OEMCryptoResult SessionContext::CopyOldUsageEntry(
|
||||
const std::vector<uint8_t>& pst) {
|
||||
if (!usage_entry_) return OEMCrypto_ERROR_INVALID_CONTEXT;
|
||||
return ce_->usage_table().CopyOldUsageEntry(usage_entry_, pst);
|
||||
return usage_entry_->CopyOldUsageEntry(pst);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user