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

Unified Diff: chrome/browser/renderer_host/resource_dispatcher_host.cc

Issue 220009: Provides a certificate for SSL client authentication on NSS sockets.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 2 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
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | net/socket/ssl_client_socket_nss.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/resource_dispatcher_host.cc
===================================================================
--- chrome/browser/renderer_host/resource_dispatcher_host.cc (revisiĆ³n: 28534)
+++ chrome/browser/renderer_host/resource_dispatcher_host.cc (copia de trabajo)
@@ -1052,6 +1052,14 @@
net::SSLCertRequestInfo* cert_request_info) {
DCHECK(request);
+#if defined(OS_LINUX)
+ bool select_first_cert = CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kAutoSSLClientAuth);
+ net::X509Certificate* cert =
+ select_first_cert && !cert_request_info->client_certs.empty() ?
+ cert_request_info->client_certs[0] : NULL;
+ request->ContinueWithCertificate(cert);
+#else
if (cert_request_info->client_certs.empty()) {
// No need to query the user if there are no certs to choose from.
request->ContinueWithCertificate(NULL);
@@ -1064,6 +1072,7 @@
info->set_ssl_client_auth_handler(
new SSLClientAuthHandler(request, cert_request_info, io_loop_, ui_loop_));
info->ssl_client_auth_handler()->SelectCertificate();
+#endif
}
void ResourceDispatcherHost::OnSSLCertificateError(
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | net/socket/ssl_client_socket_nss.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698