Assume Keybox provisioning type if OTA Keybox is supported.
[ Cherry pick of http://ag/15854889 ] [ Merge of http://go/wvgerrit/133943 and http://go/wvgerrit/134043 ] Certain OEMCrypto implementations will not report their provisioning method if the keybox is invalid. If the OEMCrypto implementation supports OTA keybox provisioning and does not report its provisioning method, then keybox provisioning is assumed. Bug: 187646550 Test: unit/integration/GtsMediaTestCases Change-Id: Ie7753546e53fc73fd59803958e88edf416ee5336
This commit is contained in:
@@ -301,6 +301,11 @@ CdmResponseType CryptoSession::GetProvisioningMethod(
|
||||
break;
|
||||
case OEMCrypto_ProvisioningError:
|
||||
default:
|
||||
if (static_cast<int>(method) == 0 && needs_keybox_provisioning_) {
|
||||
LOGW("Overriding provisioning method, assuming keybox");
|
||||
type = kClientTokenKeybox;
|
||||
break;
|
||||
}
|
||||
LOGE("OEMCrypto_GetProvisioningMethod failed: method = %d",
|
||||
static_cast<int>(method));
|
||||
metrics_->oemcrypto_provisioning_method_.SetError(method);
|
||||
|
||||
@@ -162,6 +162,8 @@ CdmResponseType OtaKeyboxProvisioner::GetProvisioningRequest(
|
||||
static_cast<int>(result));
|
||||
client_id->Clear();
|
||||
}
|
||||
LOGI("OTA request generated");
|
||||
LOGV("ota_request_data = %s", b2a_hex(ota_request_data).c_str());
|
||||
OtaRequest* ota_request = prov_request.mutable_android_ota_keybox_request();
|
||||
ota_request->set_ota_request(ota_request_data);
|
||||
|
||||
@@ -255,8 +257,8 @@ CdmResponseType OtaKeyboxProvisioner::HandleProvisioningResponse(
|
||||
const CdmResponseType result = crypto_session_->LoadOtaProvisioning(
|
||||
kProductionKeybox, ota_response_data);
|
||||
if (result == NO_ERROR) {
|
||||
LOGV("OTA response successfully processed: ota_response_data = %s",
|
||||
b2a_hex(ota_response_data).c_str());
|
||||
LOGI("OTA response successfully processed");
|
||||
LOGV("ota_response_data = %s", b2a_hex(ota_response_data).c_str());
|
||||
fallback_policy_->MarkProvisioned();
|
||||
response_received_ = true;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user