Remove shared license code from OEMCrypto

Bug: b/119881112
Merge of http://go/wvgerrit/68983
Test: Android + Linux tests for ref and L3

This CL removes tests from OEMCrypto that test shared license
functionality and code in the ref and L3 that handle shared licenses.

Change-Id: Ia11510d8db3fa6e471a4ebbdb371fd76b0812984
This commit is contained in:
Srujan Gaddam
2018-12-19 13:46:34 -08:00
parent 2870210598
commit 80166b37e2
9 changed files with 476141 additions and 476305 deletions

View File

@@ -552,10 +552,6 @@ OEMCryptoResult SessionContext::LoadKeys(
}
}
// If there are already keys installed in this session, then we can load
// a shared license.
bool second_license = (session_keys_->size() > 0);
// Decrypt and install keys in key object
// Each key will have a key control block. They will all have the same nonce.
OEMCryptoResult status = OEMCrypto_SUCCESS;
@@ -587,7 +583,7 @@ OEMCryptoResult SessionContext::LoadKeys(
OEMCryptoResult result =
InstallKey(key_id, enc_key_data, key_data_iv, key_control,
key_control_iv, second_license);
key_control_iv);
if (result != OEMCrypto_SUCCESS) {
status = result;
break;
@@ -695,7 +691,7 @@ OEMCryptoResult SessionContext::InstallKey(
const KeyId& key_id, const std::vector<uint8_t>& key_data,
const std::vector<uint8_t>& key_data_iv,
const std::vector<uint8_t>& key_control,
const std::vector<uint8_t>& key_control_iv, bool second_license) {
const std::vector<uint8_t>& key_control_iv) {
// Decrypt encrypted key_data using derived encryption key and offered iv
std::vector<uint8_t> content_key;
std::vector<uint8_t> key_control_str;
@@ -745,12 +741,6 @@ OEMCryptoResult SessionContext::InstallKey(
LOGE("LoadKeys: Failed Nonce/PST check.");
return result;
}
if (key_control_block.control_bits() & wvoec::kSharedLicense) {
if (!second_license) {
LOGE("LoadKeys: Shared License, but no keys previously loaded.");
return OEMCrypto_ERROR_MISSING_MASTER;
}
}
if (key_control_block.control_bits() & wvoec::kControlSRMVersionRequired) {
if (srm_requirements_status_ == NoSRMVersion) {
LOGE("[LoadKeys: control bit says SRM version required]");