Allow clear lead to play before key policy loaded
Merge from Widevine repo of http://go/wvgerrit/56760 This CL backs out one restriction added in http://go/wvgerrit/42941. In that CL, a sample would not be processed if the policy engine says the key cannot be used for a given security level. The change relaxes the check and does not run the verification if the sample is clear. Bug: 112113797 Bug: 115758660 Test: GTS tests. Unit tests. Verified Play movies and Netflix. Test: version number unit tests fail as expected. Change-Id: I5238745c3d3d7f0eb7fae203f4579e8df4d0681b
This commit is contained in:
@@ -577,18 +577,20 @@ CdmResponseType CdmSession::Decrypt(const CdmDecryptionParameters& params) {
|
|||||||
return NOT_INITIALIZED_ERROR;
|
return NOT_INITIALIZED_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Playback may not begin until either the start time passes or the license
|
// Encrypted playback may not begin until either the start time passes or the
|
||||||
// is updated, so we treat this Decrypt call as invalid.
|
// license is updated, so we treat this Decrypt call as invalid.
|
||||||
if (params.is_encrypted &&
|
// For the clear lead, we allow playback even if the key_id is not found or if
|
||||||
!policy_engine_->CanDecryptContent(*params.key_id)) {
|
// the security level is not high enough yet.
|
||||||
if (policy_engine_->IsLicenseForFuture()) return DECRYPT_NOT_READY;
|
if (params.is_encrypted) {
|
||||||
if (!policy_engine_->IsSufficientOutputProtection(*params.key_id))
|
if (!policy_engine_->CanDecryptContent(*params.key_id)) {
|
||||||
return INSUFFICIENT_OUTPUT_PROTECTION;
|
if (policy_engine_->IsLicenseForFuture()) return DECRYPT_NOT_READY;
|
||||||
return NEED_KEY;
|
if (!policy_engine_->IsSufficientOutputProtection(*params.key_id))
|
||||||
}
|
return INSUFFICIENT_OUTPUT_PROTECTION;
|
||||||
|
return NEED_KEY;
|
||||||
if (!policy_engine_->CanUseKey(*params.key_id, security_level_)) {
|
}
|
||||||
return KEY_PROHIBITED_FOR_SECURITY_LEVEL;
|
if (!policy_engine_->CanUseKey(*params.key_id, security_level_)) {
|
||||||
|
return KEY_PROHIBITED_FOR_SECURITY_LEVEL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CdmResponseType status = crypto_session_->Decrypt(params);
|
CdmResponseType status = crypto_session_->Decrypt(params);
|
||||||
|
|||||||
Reference in New Issue
Block a user