Log bad provisioning response
[ Merge of http://go/wvgerrit/156177 ] If the json from a provisioning request is not parsed, we log it as an error. Bug: 242744857 Test: WV unit/integration tests Change-Id: Ie8ff9388fb520c848b951d6102b23552ce309903
This commit is contained in:
@@ -566,7 +566,8 @@ CdmResponseType CertificateProvisioning::HandleProvisioningResponse(
|
||||
const bool result =
|
||||
ExtractAndDecodeSignedMessage(response_message, &response);
|
||||
if (!result || response.empty()) {
|
||||
LOGE("Provisioning response message is an invalid JSON/base64 string");
|
||||
LOGE("Provisioning response message is an invalid JSON/base64 string: %s",
|
||||
response.c_str());
|
||||
return CERT_PROVISIONING_RESPONSE_ERROR_1;
|
||||
}
|
||||
}
|
||||
@@ -733,7 +734,7 @@ bool CertificateProvisioning::ExtractAndDecodeSignedMessage(
|
||||
|
||||
if (start == provisioning_response.npos) {
|
||||
// Message is not properly wrapped - reject it.
|
||||
LOGE("Cannot locate start substring");
|
||||
LOGE("Cannot locate start substring '%s'", json_start_substr.c_str());
|
||||
result->clear();
|
||||
return false;
|
||||
}
|
||||
@@ -742,7 +743,7 @@ bool CertificateProvisioning::ExtractAndDecodeSignedMessage(
|
||||
const size_t end = provisioning_response.find(
|
||||
json_end_substr, start + json_start_substr.length());
|
||||
if (end == provisioning_response.npos) {
|
||||
LOGE("Cannot locate end substring");
|
||||
LOGE("Cannot locate end substring '%s'", json_end_substr.c_str());
|
||||
result->clear();
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user