Merge changes I44095261,I30829ad7 into udc-dev
* changes: Dump BCC on failed provisioning request Refresh corpus for oemcrypto fuzz tests with modified format
This commit is contained in:
@@ -186,11 +186,15 @@ bool ExtractSignedMessage(const std::string& response,
|
||||
// TODO(b/242744857): This extra debugging may not be needed in all cases. When
|
||||
// provisioning fails, this dumps the cert and other information.
|
||||
std::string DumpProvAttempt(const std::string& url, const std::string& request,
|
||||
const std::string& http_message) {
|
||||
const std::string& http_message,
|
||||
CdmEngine* cdm_engine) {
|
||||
std::stringstream info;
|
||||
info << "Provisioning url: " << url << "\n";
|
||||
info << "Request: " << wvutil::unlimited_b2a_hex(request) << "\n";
|
||||
info << "http_message: " << wvutil::unlimited_b2a_hex(http_message) << "\n";
|
||||
std::string system_id;
|
||||
cdm_engine->QueryStatus(kLevelDefault, QUERY_KEY_SYSTEM_ID, &system_id);
|
||||
info << "system id: " << system_id << "\n";
|
||||
if (wvoec::global_features.derive_key_method ==
|
||||
wvoec::DeviceFeatures::TEST_PROVISION_30) {
|
||||
std::vector<uint8_t> cert;
|
||||
@@ -468,7 +472,10 @@ void WvCdmTestBase::Provision() {
|
||||
|
||||
// Receive and parse response.
|
||||
std::string http_message;
|
||||
ASSERT_NO_FATAL_FAILURE(url_request.AssertOkResponse(&http_message));
|
||||
ASSERT_NO_FATAL_FAILURE(url_request.AssertOkResponse(&http_message))
|
||||
<< "Failed to fetch provisioning response. "
|
||||
<< DumpProvAttempt(provisioning_server_url, prov_request, http_message,
|
||||
&cdm_engine);
|
||||
|
||||
if (binary_provisioning_) {
|
||||
// extract provisioning response from received message
|
||||
@@ -501,13 +508,13 @@ void WvCdmTestBase::Provision() {
|
||||
&wrapped_key))
|
||||
<< "Binary provisioning failed. "
|
||||
<< DumpProvAttempt(provisioning_server_url, prov_request,
|
||||
http_message);
|
||||
http_message, &cdm_engine);
|
||||
} else {
|
||||
ASSERT_EQ(NO_ERROR, cdm_engine.HandleProvisioningResponse(
|
||||
http_message, kLevelDefault, &cert, &wrapped_key))
|
||||
<< "Non-binary provisioning failed. "
|
||||
<< DumpProvAttempt(provisioning_server_url, prov_request,
|
||||
http_message);
|
||||
http_message, &cdm_engine);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user