Don't use empty core message

Merge from Widevine repo of http://go/wvgerrit/93824

This treats an empty core message as not having a core message.

Bug: 149110740
Change-Id: Icacfc5d9a5bdce9b136c25c59205eee575cfba72
Tests: Ran ExoPlayer on taimen
This commit is contained in:
Fred Gylys-Colwell
2020-02-11 13:59:23 -08:00
parent 6a0cc01e0f
commit eeeb0304ed
4 changed files with 17 additions and 8 deletions

View File

@@ -360,11 +360,13 @@ CdmResponseType CertificateProvisioning::HandleProvisioningResponse(
}
if (supports_core_messages() &&
!signed_response.has_oemcrypto_core_message()) {
(!signed_response.has_oemcrypto_core_message() ||
signed_response.oemcrypto_core_message().empty())) {
LOGE("Signed response does not have core message");
error = true;
} else if (!supports_core_messages() &&
signed_response.has_oemcrypto_core_message()) {
(signed_response.has_oemcrypto_core_message() &&
!signed_response.oemcrypto_core_message().empty())) {
const std::string& core_message = signed_response.oemcrypto_core_message();
// This case should not occur. However, the CDM will let OEMCrypto
// fail.