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

Unified Diff: net/socket/ssl_client_socket_mac.cc

Issue 173328: Fix a typo IsCertStatusError. It should be IsCertificateError.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Upload before checkin Created 11 years, 4 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/socket/ssl_client_socket_mac.cc
===================================================================
--- net/socket/ssl_client_socket_mac.cc (revision 23576)
+++ net/socket/ssl_client_socket_mac.cc (working copy)
@@ -92,7 +92,6 @@
switch (status) {
case errSSLWouldBlock:
return ERR_IO_PENDING;
- case errSSLIllegalParam:
case errSSLBadCipherSuite:
case errSSLBadConfiguration:
return ERR_INVALID_ARGUMENT;
@@ -105,6 +104,8 @@
case errSSLInternal:
case errSSLCrypto:
case errSSLFatalAlert:
+ case errSSLIllegalParam: // Received an illegal_parameter alert.
+ case errSSLPeerUnexpectedMsg: // Received an unexpected_message alert.
case errSSLProtocol:
return ERR_SSL_PROTOCOL_ERROR;
case errSSLHostNameMismatch:
@@ -246,7 +247,8 @@
X509Certificate* GetServerCert(SSLContextRef ssl_context) {
CFArrayRef certs;
OSStatus status = SSLCopyPeerCertificates(ssl_context, &certs);
- if (status != noErr)
+ // SSLCopyPeerCertificates may succeed but return a null |certs|.
+ if (status != noErr || !certs)
return NULL;
DCHECK_GT(CFArrayGetCount(certs), 0);
@@ -529,7 +531,7 @@
}
}
}
- } else if (IsCertStatusError(net_error)) {
+ } else if (IsCertificateError(net_error)) {
server_cert_ = GetServerCert(ssl_context_);
DCHECK(server_cert_);
server_cert_status_ |= MapNetErrorToCertStatus(net_error);
« 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