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

Unified Diff: net/base/ssl_client_socket_nss.cc

Issue 14915: Move certificate verification off the IO thread.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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 | « net/base/ssl_client_socket_mac.cc ('k') | net/base/ssl_client_socket_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/ssl_client_socket_nss.cc
===================================================================
--- net/base/ssl_client_socket_nss.cc (revision 9082)
+++ net/base/ssl_client_socket_nss.cc (working copy)
@@ -100,31 +100,6 @@
}
}
-// Shared with the Windows code. TODO(avi): merge to a common place
-int CertStatusFromNetError(int error) {
- switch (error) {
- case ERR_CERT_COMMON_NAME_INVALID:
- return CERT_STATUS_COMMON_NAME_INVALID;
- case ERR_CERT_DATE_INVALID:
- return CERT_STATUS_DATE_INVALID;
- case ERR_CERT_AUTHORITY_INVALID:
- return CERT_STATUS_AUTHORITY_INVALID;
- case ERR_CERT_NO_REVOCATION_MECHANISM:
- return CERT_STATUS_NO_REVOCATION_MECHANISM;
- case ERR_CERT_UNABLE_TO_CHECK_REVOCATION:
- return CERT_STATUS_UNABLE_TO_CHECK_REVOCATION;
- case ERR_CERT_REVOKED:
- return CERT_STATUS_REVOKED;
- case ERR_CERT_CONTAINS_ERRORS:
- NOTREACHED();
- // Falls through.
- case ERR_CERT_INVALID:
- return CERT_STATUS_INVALID;
- default:
- return 0;
- }
-}
-
} // namespace
bool SSLClientSocketNSS::nss_options_initialized_ = false;
@@ -538,7 +513,7 @@
if (net_error == ERR_IO_PENDING) {
GotoState(STATE_HANDSHAKE_READ);
} else {
- server_cert_status_ = CertStatusFromNetError(net_error);
+ server_cert_status_ = MapNetErrorToCertStatus(net_error);
LOG(ERROR) << "handshake failed; NSS error code " << prerr
<< ", net_error " << net_error << ", server_cert_status "
<< server_cert_status_;
« no previous file with comments | « net/base/ssl_client_socket_mac.cc ('k') | net/base/ssl_client_socket_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698