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

Unified Diff: net/base/ssl_client_socket_win.cc

Issue 115361: Backport r16026 from the trunk to the 172 branch.... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/branches/172/src/
Patch Set: Created 11 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/ssl_client_socket_win.cc
===================================================================
--- net/base/ssl_client_socket_win.cc (revision 16065)
+++ net/base/ssl_client_socket_win.cc (working copy)
@@ -615,8 +615,23 @@
return DidCompleteHandshake();
}
- if (FAILED(isc_status_))
- return MapSecurityError(isc_status_);
+ if (FAILED(isc_status_)) {
+ int result = MapSecurityError(isc_status_);
+ // We told Schannel to not verify the server certificate
+ // (SCH_CRED_MANUAL_CRED_VALIDATION), so any certificate error returned by
+ // InitializeSecurityContext must be referring to the (missing) client
+ // certificate.
+ if (IsCertificateError(result)) {
+ // TODO(wtc): When we support SSL client authentication, we will need to
+ // add new error codes for client certificate errors reported by the
+ // server using SSL/TLS alert messages. See http://crbug.com/318. See
+ // also the MSDN page "Schannel Error Codes for TLS and SSL Alerts",
+ // which maps TLS alert messages to Windows error codes:
+ // http://msdn.microsoft.com/en-us/library/dd721886%28VS.85%29.aspx
+ return ERR_SSL_CLIENT_AUTH_CERT_NEEDED;
+ }
+ return result;
+ }
if (isc_status_ == SEC_I_INCOMPLETE_CREDENTIALS) {
// We don't support SSL client authentication yet. For now we just set
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698