Accept new signing keys for no renewal license
Merge of widevine change https://widevine-internal-review.googlesource.com/#/c/11501/ A license response can have new signing (mac) keys attached whether the license can be renewed or not. Previously, the new keys were ignored if the license could not be renewed. bug: 18009750 Secure stop release generation failing for Netflix Change-Id: I06dd76b0ab9f459021f46eecc938aa43d8d29689
This commit is contained in:
@@ -636,16 +636,16 @@ CdmResponseType CdmLicense::HandleKeyResponse(
|
||||
// Extract mac key
|
||||
std::string mac_key_iv;
|
||||
std::string mac_key;
|
||||
if (license.policy().can_renew()) {
|
||||
for (int i = 0; i < license.key_size(); ++i) {
|
||||
if (license.key(i).type() == License_KeyContainer::SIGNING) {
|
||||
mac_key_iv.assign(license.key(i).iv());
|
||||
for (int i = 0; i < license.key_size(); ++i) {
|
||||
if (license.key(i).type() == License_KeyContainer::SIGNING) {
|
||||
mac_key_iv.assign(license.key(i).iv());
|
||||
|
||||
// Strip off PKCS#5 padding
|
||||
mac_key.assign(license.key(i).key().data(), MAC_KEY_SIZE);
|
||||
}
|
||||
// Strip off PKCS#5 padding
|
||||
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) {
|
||||
LOGE(
|
||||
"CdmLicense::HandleKeyResponse: mac key/iv size error"
|
||||
|
||||
Reference in New Issue
Block a user