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

Side by Side Diff: net/socket/ssl_client_socket_nss_factory.cc

Issue 795006: When using SSLClientSocketNSS on Windows, fall back on SSLClientSocketWin... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Log an error message if we can't open the MY system certificate store. Created 10 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/socket/ssl_client_socket_nss.cc ('k') | net/socket/ssl_client_socket_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/socket/client_socket_factory.h" 5 #include "net/socket/client_socket_factory.h"
6 6
7 #include "build/build_config.h"
7 #include "net/socket/ssl_client_socket_nss.h" 8 #include "net/socket/ssl_client_socket_nss.h"
9 #if defined(OS_WIN)
10 #include "net/socket/ssl_client_socket_win.h"
11 #endif
8 12
9 // This file is only used on platforms where NSS is not the system SSL 13 // This file is only used on platforms where NSS is not the system SSL
10 // library. When compiled, this file is the only object module that pulls 14 // library. When compiled, this file is the only object module that pulls
11 // in the dependency on NSPR and NSS. This allows us to control which 15 // in the dependency on NSPR and NSS. This allows us to control which
12 // projects depend on NSPR and NSS on those platforms. 16 // projects depend on NSPR and NSS on those platforms.
13 17
14 namespace net { 18 namespace net {
15 19
16 SSLClientSocket* SSLClientSocketNSSFactory( 20 SSLClientSocket* SSLClientSocketNSSFactory(
17 ClientSocket* transport_socket, 21 ClientSocket* transport_socket,
18 const std::string& hostname, 22 const std::string& hostname,
19 const SSLConfig& ssl_config) { 23 const SSLConfig& ssl_config) {
24 // TODO(wtc): SSLClientSocketNSS can't do SSL client authentication using
25 // CryptoAPI yet (http://crbug.com/37560), so we fall back on
26 // SSLClientSocketWin.
27 #if defined(OS_WIN)
28 if (ssl_config.client_cert)
29 return new SSLClientSocketWin(transport_socket, hostname, ssl_config);
30 #endif
31
20 return new SSLClientSocketNSS(transport_socket, hostname, ssl_config); 32 return new SSLClientSocketNSS(transport_socket, hostname, ssl_config);
21 } 33 }
22 34
23 } // namespace net 35 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_nss.cc ('k') | net/socket/ssl_client_socket_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698