summaryrefslogtreecommitdiffstats
path: root/net/socket
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-12 14:49:04 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-12 14:49:04 +0000
commitfc7de49e356bc0b2961170713583904a6c248a55 (patch)
tree1a16482939a64abc14dc4a483da7f2785b49c327 /net/socket
parent0ced842a26fcc6bd9be368786fcff7c6428f4a05 (diff)
downloadchromium_src-fc7de49e356bc0b2961170713583904a6c248a55.zip
chromium_src-fc7de49e356bc0b2961170713583904a6c248a55.tar.gz
chromium_src-fc7de49e356bc0b2961170713583904a6c248a55.tar.bz2
Plumb SSL connection information into the PageInfo model.
This plumbs two bits of information into the PageInfo model (the dialog which results from clicking on the padlock icon): whether or not we performed SSLv3 fallback and whether or not the server supported the renegotiation extension. It doesn't actually do anything with this information yet (except to add histograms of them), pending future CLs. BUG=none TEST=none http://codereview.chromium.org/2943001/show git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52079 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket')
-rw-r--r--net/socket/ssl_client_socket_mac.cc4
-rw-r--r--net/socket/ssl_client_socket_nss.cc15
-rw-r--r--net/socket/ssl_client_socket_win.cc6
3 files changed, 25 insertions, 0 deletions
diff --git a/net/socket/ssl_client_socket_mac.cc b/net/socket/ssl_client_socket_mac.cc
index f1d2278..325df61 100644
--- a/net/socket/ssl_client_socket_mac.cc
+++ b/net/socket/ssl_client_socket_mac.cc
@@ -18,6 +18,7 @@
#include "net/base/net_errors.h"
#include "net/base/net_log.h"
#include "net/base/ssl_cert_request_info.h"
+#include "net/base/ssl_connection_status_flags.h"
#include "net/base/ssl_info.h"
// Welcome to Mac SSL. We've been waiting for you.
@@ -652,6 +653,9 @@ void SSLClientSocketMac::GetSSLInfo(SSLInfo* ssl_info) {
OSStatus status = SSLGetNegotiatedCipher(ssl_context_, &suite);
if (!status)
ssl_info->security_bits = KeySizeOfCipherSuite(suite);
+
+ if (ssl_config_.ssl3_fallback)
+ ssl_info->connection_status |= SSL_CONNECTION_SSL3_FALLBACK;
}
void SSLClientSocketMac::GetSSLCertRequestInfo(
diff --git a/net/socket/ssl_client_socket_nss.cc b/net/socket/ssl_client_socket_nss.cc
index 285499e..5226c56 100644
--- a/net/socket/ssl_client_socket_nss.cc
+++ b/net/socket/ssl_client_socket_nss.cc
@@ -60,6 +60,7 @@
#include <pk11pub.h>
#include "base/compiler_specific.h"
+#include "base/histogram.h"
#include "base/logging.h"
#include "base/nss_util.h"
#include "base/singleton.h"
@@ -70,6 +71,7 @@
#include "net/base/net_log.h"
#include "net/base/net_errors.h"
#include "net/base/ssl_cert_request_info.h"
+#include "net/base/ssl_connection_status_flags.h"
#include "net/base/ssl_info.h"
#include "net/base/sys_addrinfo.h"
#include "net/ocsp/nss_ocsp.h"
@@ -789,6 +791,19 @@ void SSLClientSocketNSS::GetSSLInfo(SSLInfo* ssl_info) {
DCHECK(server_cert_ != NULL);
ssl_info->cert = server_cert_;
+ PRBool peer_supports_renego_ext;
+ ok = SSL_HandshakeNegotiatedExtension(nss_fd_, ssl_renegotiation_info_xtn,
+ &peer_supports_renego_ext);
+ if (ok == SECSuccess) {
+ if (!peer_supports_renego_ext)
+ ssl_info->connection_status |= SSL_CONNECTION_NO_RENEGOTIATION_EXTENSION;
+ UMA_HISTOGRAM_ENUMERATION("Net.RenegotiationExtensionSupported",
+ (int)peer_supports_renego_ext, 2);
+ }
+
+ if (ssl_config_.ssl3_fallback)
+ ssl_info->connection_status |= SSL_CONNECTION_SSL3_FALLBACK;
+
LeaveFunction("");
}
diff --git a/net/socket/ssl_client_socket_win.cc b/net/socket/ssl_client_socket_win.cc
index a0da5f4..9a4be48 100644
--- a/net/socket/ssl_client_socket_win.cc
+++ b/net/socket/ssl_client_socket_win.cc
@@ -17,6 +17,7 @@
#include "net/base/net_log.h"
#include "net/base/net_errors.h"
#include "net/base/ssl_cert_request_info.h"
+#include "net/base/ssl_connection_status_flags.h"
#include "net/base/ssl_info.h"
#pragma comment(lib, "secur32.lib")
@@ -335,6 +336,8 @@ SSLClientSocketWin::~SSLClientSocketWin() {
}
void SSLClientSocketWin::GetSSLInfo(SSLInfo* ssl_info) {
+ ssl_info->Reset();
+
if (!server_cert_)
return;
@@ -349,6 +352,9 @@ void SSLClientSocketWin::GetSSLInfo(SSLInfo* ssl_info) {
// normalized.
ssl_info->security_bits = connection_info.dwCipherStrength;
}
+
+ if (ssl_config_.ssl3_fallback)
+ ssl_info->connection_status |= SSL_CONNECTION_SSL3_FALLBACK;
}
void SSLClientSocketWin::GetSSLCertRequestInfo(