Send spoids in provisioning requests
[ Merge of http://go/wvgerrit/87283 ] SPOIDs (Stable Per-Origin IDentifiers) were not correctly being set during CdmEngine construction. This resulted in SPOID values not being sent in provisioning requests. This caused the serial number in the drm certificate to not be stable after a reprovision. This behaviour appears to be true going back to O. CdmEngine no longer takes a SPOID in the constructor since not all callers use SPOIDs. A setter has been added in its place. Previously spoid had a default argument to the constructor. Bug: 142368328 Test: android unit/integration tests Change-Id: I711346df609636ecf1475dc37873454a7ef000c0
This commit is contained in:
@@ -71,13 +71,12 @@ class UsagePropertySet : public CdmClientPropertySet {
|
||||
};
|
||||
|
||||
CdmEngine::CdmEngine(FileSystem* file_system,
|
||||
std::shared_ptr<metrics::EngineMetrics> metrics,
|
||||
const std::string& spoid)
|
||||
std::shared_ptr<metrics::EngineMetrics> metrics)
|
||||
: metrics_(metrics),
|
||||
cert_provisioning_(),
|
||||
cert_provisioning_requested_security_level_(kLevelDefault),
|
||||
file_system_(file_system),
|
||||
spoid_(spoid),
|
||||
spoid_(EMPTY_SPOID),
|
||||
usage_session_(),
|
||||
usage_property_set_(),
|
||||
last_usage_information_update_time_(0) {
|
||||
@@ -284,9 +283,8 @@ CdmResponseType CdmEngine::GenerateKeyRequest(
|
||||
session->GetMetrics()->cdm_session_restore_offline_session_.Increment(
|
||||
sts, error_detail);
|
||||
if (sts != KEY_ADDED) {
|
||||
LOGE(
|
||||
"Key release restoration failed, status = %d",
|
||||
static_cast<int>(sts));
|
||||
LOGE("Key release restoration failed, status = %d",
|
||||
static_cast<int>(sts));
|
||||
return sts;
|
||||
}
|
||||
}
|
||||
@@ -674,9 +672,8 @@ CdmResponseType CdmEngine::QueryStatus(SecurityLevel security_level,
|
||||
CdmClientTokenType token_type = kClientTokenUninitialized;
|
||||
status = crypto_session->GetProvisioningMethod(security_level, &token_type);
|
||||
if (status != NO_ERROR) {
|
||||
LOGW(
|
||||
"GetProvisioningMethod failed: status = %d",
|
||||
static_cast<int>(status));
|
||||
LOGW("GetProvisioningMethod failed: status = %d",
|
||||
static_cast<int>(status));
|
||||
return status;
|
||||
}
|
||||
switch (token_type) {
|
||||
|
||||
Reference in New Issue
Block a user