Merge "Accept new signing keys for no renewal license" into lmp-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
9810ff8925
@@ -636,16 +636,16 @@ CdmResponseType CdmLicense::HandleKeyResponse(
|
|||||||
// Extract mac key
|
// Extract mac key
|
||||||
std::string mac_key_iv;
|
std::string mac_key_iv;
|
||||||
std::string mac_key;
|
std::string mac_key;
|
||||||
if (license.policy().can_renew()) {
|
for (int i = 0; i < license.key_size(); ++i) {
|
||||||
for (int i = 0; i < license.key_size(); ++i) {
|
if (license.key(i).type() == License_KeyContainer::SIGNING) {
|
||||||
if (license.key(i).type() == License_KeyContainer::SIGNING) {
|
mac_key_iv.assign(license.key(i).iv());
|
||||||
mac_key_iv.assign(license.key(i).iv());
|
|
||||||
|
|
||||||
// Strip off PKCS#5 padding
|
// Strip off PKCS#5 padding
|
||||||
mac_key.assign(license.key(i).key().data(), MAC_KEY_SIZE);
|
mac_key.assign(license.key(i).key().data(), MAC_KEY_SIZE);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (license.policy().can_renew() ||
|
||||||
|
(mac_key_iv.size() != 0 || mac_key.size() != 0)) {
|
||||||
if (mac_key_iv.size() != KEY_IV_SIZE || mac_key.size() != MAC_KEY_SIZE) {
|
if (mac_key_iv.size() != KEY_IV_SIZE || mac_key.size() != MAC_KEY_SIZE) {
|
||||||
LOGE(
|
LOGE(
|
||||||
"CdmLicense::HandleKeyResponse: mac key/iv size error"
|
"CdmLicense::HandleKeyResponse: mac key/iv size error"
|
||||||
|
|||||||
Reference in New Issue
Block a user