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

Unified Diff: net/socket/ssl_client_socket_nss.cc

Issue 7275027: Detect Kaspersky SSL MITM and give a helpful error message. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 6 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_nss.h ('k') | 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_nss.cc
diff --git a/net/socket/ssl_client_socket_nss.cc b/net/socket/ssl_client_socket_nss.cc
index 9657026f73ebe1bd42236e684391cc4855f2f17e..76c270cb05ced4b97c6b656a54378c5cfefc5d4e 100644
--- a/net/socket/ssl_client_socket_nss.cc
+++ b/net/socket/ssl_client_socket_nss.cc
@@ -451,6 +451,7 @@ SSLClientSocketNSS::SSLClientSocketNSS(ClientSocketHandle* transport_socket,
handshake_callback_called_(false),
completed_handshake_(false),
eset_mitm_detected_(false),
+ kaspersky_mitm_detected_(false),
predicted_cert_chain_correct_(false),
next_handshake_state_(STATE_NONE),
nss_fd_(NULL),
@@ -633,6 +634,7 @@ void SSLClientSocketNSS::Disconnect() {
ssl_connection_status_ = 0;
completed_handshake_ = false;
eset_mitm_detected_ = false;
+ kaspersky_mitm_detected_ = false;
start_cert_verification_time_ = base::TimeTicks();
predicted_cert_chain_correct_ = false;
nss_bufs_ = NULL;
@@ -1380,6 +1382,8 @@ int SSLClientSocketNSS::DoHandshake() {
if (handshake_callback_called_) {
if (eset_mitm_detected_) {
net_error = ERR_ESET_ANTI_VIRUS_SSL_INTERCEPTION;
+ } else if (kaspersky_mitm_detected_) {
+ net_error = ERR_KASPERSKY_ANTI_VIRUS_SSL_INTERCEPTION;
} else {
// We need to see if the predicted certificate chain (in
// |ssl_host_info_->state().certs) matches the actual certificate chain
@@ -1877,6 +1881,10 @@ SECStatus SSLClientSocketNSS::OwnAuthCertHandler(void* arg,
if (strcmp(common_name, "ESET_RootSslCert") == 0)
that->eset_mitm_detected_ = true;
if (strcmp(common_name,
+ "Kaspersky Anti-Virus personal root certificate") == 0) {
+ that->kaspersky_mitm_detected_ = true;
+ }
wtc 2011/06/30 14:26:25 Nit: since disabling False Start doesn't help, it
agl 2011/07/01 14:34:42 Done. It's still within an #ifdef SSL_ENABLE_FALSE
+ if (strcmp(common_name,
"ContentWatch Root Certificate Authority") == 0) {
// This is NetNanny. NetNanny are updating their product so we
// silently disable False Start for now.
« no previous file with comments | « net/socket/ssl_client_socket_nss.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698