Fallback to L3 if provisioning lost
Merge from Widevine repo of http://go/wvgerrit/142349 If a provisioning request is sent, but no response is loaded, we should fall back to L3. This covers the case where the OTA request is malformed and the provisioning server ignores it. This might happen if the device has a bad KM key. Test: manual testing Bug: 210823889 Bug: 210807585 Change-Id: I951241539ace97b668868d5abf8a9811d874fb28
This commit is contained in:
@@ -3135,6 +3135,12 @@ CdmResponseType CryptoSession::LoadOtaProvisioning(
|
||||
WithOecWriteLock("LoadOtaProvisioning",
|
||||
[&] { needs_keybox_provisioning_ = false; });
|
||||
}
|
||||
CdmResponseType result = GetSystemIdInternal(&system_id_);
|
||||
if (result == NO_ERROR) {
|
||||
LOGD("New system id is %d", system_id_);
|
||||
} else {
|
||||
LOGE("Failed to fetch system ID");
|
||||
}
|
||||
return MapOEMCryptoResult(status, UNKNOWN_ERROR, "LoadOtaProvisioning");
|
||||
}
|
||||
|
||||
|
||||
@@ -97,6 +97,12 @@ OtaKeyboxProvisioner::OtaKeyboxProvisioner(
|
||||
}
|
||||
|
||||
OtaKeyboxProvisioner::~OtaKeyboxProvisioner() {
|
||||
// If we sent a request, and did not get a response, and we still need to
|
||||
// provision, then there was an error and we should trigger fallback.
|
||||
if (request_generated_ && (!response_received_) && (!IsProvisioned())) {
|
||||
LOGE("OTA Provisioning not processed. Falling back to L3");
|
||||
fallback_policy_->TriggerFallback();
|
||||
}
|
||||
crypto_session_.reset();
|
||||
fallback_policy_ = nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user