Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Unified Diff: chrome/browser/captive_portal/captive_portal_browsertest.cc

Issue 1223233002: Common Name Mismatch Handler For WWW Subdomain Mismatch case (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolved comments: documentation, style changes Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/captive_portal/captive_portal_browsertest.cc
diff --git a/chrome/browser/captive_portal/captive_portal_browsertest.cc b/chrome/browser/captive_portal/captive_portal_browsertest.cc
index 72fe2bf7b665ec2e384d736a057bdc899c56a846..dcfdc605774b6fa51f2184343b4a110c5180cbc9 100644
--- a/chrome/browser/captive_portal/captive_portal_browsertest.cc
+++ b/chrome/browser/captive_portal/captive_portal_browsertest.cc
@@ -55,6 +55,7 @@
#include "content/public/test/browser_test_utils.h"
#include "net/base/net_errors.h"
#include "net/http/transport_security_state.h"
+#include "net/test/test_certificate_data.h"
#include "net/test/url_request/url_request_failed_job.h"
#include "net/test/url_request/url_request_mock_http_job.h"
#include "net/url_request/url_request.h"
@@ -345,8 +346,8 @@ void URLRequestTimeoutOnDemandJob::FailOrAbandonJobsOnIOThread(
DCHECK(job->request()->url().SchemeIsCryptographic());
net::SSLInfo info;
info.cert_status = net::CERT_STATUS_COMMON_NAME_INVALID;
- info.cert = new net::X509Certificate(
- "bad.host", "CA", base::Time::Max(), base::Time::Max());
+ info.cert = net::X509Certificate::CreateFromBytes(
mmenke 2015/07/31 15:16:49 While you're here, mind adding whatever header X50
Bhanu Dev 2015/07/31 18:20:38 Done.
+ reinterpret_cast<const char*>(google_der), sizeof(google_der));
mmenke 2015/07/31 15:16:49 google_der is a global constant? Its naming viola
Bhanu Dev 2015/07/31 18:20:38 I have added a bug for this at crbug.com/515969. B
job->NotifySSLCertificateError(info, true);
}
}

Powered by Google App Engine
This is Rietveld 408576698