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

Unified Diff: net/socket/ssl_client_socket.cc

Issue 947453003: IgnoreCertError should check if the error is a certificate error. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/socket/ssl_client_socket.h ('k') | net/socket/ssl_client_socket_pool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket.cc
diff --git a/net/socket/ssl_client_socket.cc b/net/socket/ssl_client_socket.cc
index 940c45694697a162200dc5e523800a7282db58bb..babd41e42a93046a90b1d403d9d88370fe85250e 100644
--- a/net/socket/ssl_client_socket.cc
+++ b/net/socket/ssl_client_socket.cc
@@ -10,6 +10,7 @@
#include "crypto/ec_private_key.h"
#include "net/base/connection_type_histograms.h"
#include "net/base/host_port_pair.h"
+#include "net/base/net_errors.h"
#include "net/ssl/channel_id_service.h"
#include "net/ssl/ssl_cipher_suite_names.h"
#include "net/ssl/ssl_config_service.h"
@@ -101,7 +102,10 @@ NextProto SSLClientSocket::GetNegotiatedProtocol() const {
}
bool SSLClientSocket::IgnoreCertError(int error, int load_flags) {
- return error == OK || (load_flags & LOAD_IGNORE_ALL_CERT_ERRORS);
+ if (error == OK)
+ return true;
+ return (load_flags & LOAD_IGNORE_ALL_CERT_ERRORS) &&
+ IsCertificateError(error);
}
bool SSLClientSocket::set_was_npn_negotiated(bool negotiated) {
« no previous file with comments | « net/socket/ssl_client_socket.h ('k') | net/socket/ssl_client_socket_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698