Remove keybox from OEMCrypto ref
Merge from Widevine repo of http://go/wvgerrit/56526 This CL removes the test keybox from OEMCrypto reference code. Test: unit tests Bug: 76393338 split mock into ref and testbed Change-Id: I4bf0eb777c6851191d0ac9ccf8e2b42c55c8f6b9
This commit is contained in:
@@ -206,8 +206,7 @@ OEMCryptoResult UsageTableEntry::SaveData(CryptoEngine* ce,
|
||||
|
||||
// This should be encrypted and signed with a device specific key.
|
||||
// For the reference implementation, I'm just going to use the keybox key.
|
||||
const bool override_to_real = true;
|
||||
const std::vector<uint8_t>& key = ce->DeviceRootKey(override_to_real);
|
||||
const std::vector<uint8_t>& key = ce->DeviceRootKey();
|
||||
|
||||
// Encrypt the entry.
|
||||
RAND_bytes(encrypted->iv, wvoec::KEY_IV_SIZE);
|
||||
@@ -245,8 +244,7 @@ OEMCryptoResult UsageTableEntry::LoadData(CryptoEngine* ce, uint32_t index,
|
||||
|
||||
// This should be encrypted and signed with a device specific key.
|
||||
// For the reference implementation, I'm just going to use the keybox key.
|
||||
const bool override_to_real = true;
|
||||
const std::vector<uint8_t>& key = ce->DeviceRootKey(override_to_real);
|
||||
const std::vector<uint8_t>& key = ce->DeviceRootKey();
|
||||
|
||||
// Verify the signature of the usage entry. Sign encrypted into clear buffer.
|
||||
unsigned int sig_length = SHA256_DIGEST_LENGTH;
|
||||
@@ -500,8 +498,7 @@ OEMCryptoResult UsageTable::SaveUsageTableHeader(uint8_t* signed_buffer,
|
||||
|
||||
// This should be encrypted and signed with a device specific key.
|
||||
// For the reference implementation, I'm just going to use the keybox key.
|
||||
const bool override_to_real = true;
|
||||
const std::vector<uint8_t>& key = ce_->DeviceRootKey(override_to_real);
|
||||
const std::vector<uint8_t>& key = ce_->DeviceRootKey();
|
||||
|
||||
// Encrypt the entry.
|
||||
RAND_bytes(encrypted->iv, wvoec::KEY_IV_SIZE);
|
||||
@@ -538,8 +535,7 @@ OEMCryptoResult UsageTable::LoadUsageTableHeader(
|
||||
|
||||
// This should be encrypted and signed with a device specific key.
|
||||
// For the reference implementation, I'm just going to use the keybox key.
|
||||
const bool override_to_real = true;
|
||||
const std::vector<uint8_t>& key = ce_->DeviceRootKey(override_to_real);
|
||||
const std::vector<uint8_t>& key = ce_->DeviceRootKey();
|
||||
|
||||
// Verify the signature of the usage entry. Sign encrypted into clear buffer.
|
||||
unsigned int sig_length = SHA256_DIGEST_LENGTH;
|
||||
|
||||
Reference in New Issue
Block a user