Allow PSSH data to be unspecified on license renewal
Currently the CDM requires the caller to specify init data both on key generation and renewal requests. With this change the CDM relaxes this requirement for renewals. Bug: 8732893 Merge of https://widevine-internal-review.googlesource.com/#/c/5322/ from Widevine CDM repo Change-Id: Idf4ad2bdb20023da4f30bc369ed87eb811c1c4d9
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <sstream>
|
||||
|
||||
#include "clock.h"
|
||||
#include "cdm_engine.h"
|
||||
#include "crypto_engine.h"
|
||||
#include "device_files.h"
|
||||
#include "log.h"
|
||||
@@ -62,7 +63,7 @@ bool CdmSession::VerifySession(const CdmKeySystem& key_system,
|
||||
}
|
||||
|
||||
CdmResponseType CdmSession::GenerateKeyRequest(
|
||||
const CdmInitData& pssh_data,
|
||||
const CdmInitData& init_data,
|
||||
const CdmLicenseType license_type,
|
||||
CdmAppParameterMap& app_parameters,
|
||||
CdmKeyMessage* key_request,
|
||||
@@ -83,6 +84,11 @@ CdmResponseType CdmSession::GenerateKeyRequest(
|
||||
server_url);
|
||||
}
|
||||
else {
|
||||
CdmInitData pssh_data;
|
||||
if (!CdmEngine::ExtractWidevinePssh(init_data, &pssh_data)) {
|
||||
return KEY_ERROR;
|
||||
}
|
||||
|
||||
if (Properties::use_certificates_as_identification()) {
|
||||
if (!crypto_session_->LoadCertificatePrivateKey(wrapped_key_))
|
||||
return NEED_PROVISIONING;
|
||||
|
||||
Reference in New Issue
Block a user