diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-12 14:49:04 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-12 14:49:04 +0000 |
commit | fc7de49e356bc0b2961170713583904a6c248a55 (patch) | |
tree | 1a16482939a64abc14dc4a483da7f2785b49c327 /chrome/browser/ssl | |
parent | 0ced842a26fcc6bd9be368786fcff7c6428f4a05 (diff) | |
download | chromium_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 'chrome/browser/ssl')
-rw-r--r-- | chrome/browser/ssl/ssl_manager.cc | 17 | ||||
-rw-r--r-- | chrome/browser/ssl/ssl_manager.h | 6 |
2 files changed, 16 insertions, 7 deletions
diff --git a/chrome/browser/ssl/ssl_manager.cc b/chrome/browser/ssl/ssl_manager.cc index dbff09e..d328d6e 100644 --- a/chrome/browser/ssl/ssl_manager.cc +++ b/chrome/browser/ssl/ssl_manager.cc @@ -59,11 +59,13 @@ void SSLManager::NotifySSLInternalStateChanged() { // static std::string SSLManager::SerializeSecurityInfo(int cert_id, int cert_status, - int security_bits) { + int security_bits, + int ssl_connection_status) { Pickle pickle; pickle.WriteInt(cert_id); pickle.WriteInt(cert_status); pickle.WriteInt(security_bits); + pickle.WriteInt(ssl_connection_status); return std::string(static_cast<const char*>(pickle.data()), pickle.size()); } @@ -71,13 +73,15 @@ std::string SSLManager::SerializeSecurityInfo(int cert_id, bool SSLManager::DeserializeSecurityInfo(const std::string& state, int* cert_id, int* cert_status, - int* security_bits) { + int* security_bits, + int* ssl_connection_status) { DCHECK(cert_id && cert_status && security_bits); if (state.empty()) { // No SSL used. *cert_id = 0; *cert_status = 0; *security_bits = -1; + *ssl_connection_status = 0; return false; } @@ -85,7 +89,8 @@ bool SSLManager::DeserializeSecurityInfo(const std::string& state, void * iter = NULL; return pickle.ReadInt(&iter, cert_id) && pickle.ReadInt(&iter, cert_status) && - pickle.ReadInt(&iter, security_bits); + pickle.ReadInt(&iter, security_bits) && + pickle.ReadInt(&iter, ssl_connection_status); } // static @@ -134,11 +139,12 @@ void SSLManager::DidCommitProvisionalLoad( if (details->is_main_frame) { if (entry) { // Decode the security details. - int ssl_cert_id, ssl_cert_status, ssl_security_bits; + int ssl_cert_id, ssl_cert_status, ssl_security_bits, ssl_connection_status; DeserializeSecurityInfo(details->serialized_security_info, &ssl_cert_id, &ssl_cert_status, - &ssl_security_bits); + &ssl_security_bits, + &ssl_connection_status); // We may not have an entry if this is a navigation to an initial blank // page. Reset the SSL information and add the new data we have. @@ -146,6 +152,7 @@ void SSLManager::DidCommitProvisionalLoad( entry->ssl().set_cert_id(ssl_cert_id); entry->ssl().set_cert_status(ssl_cert_status); entry->ssl().set_security_bits(ssl_security_bits); + entry->ssl().set_connection_status(ssl_connection_status); } backend_.ShowPendingMessages(); } diff --git a/chrome/browser/ssl/ssl_manager.h b/chrome/browser/ssl/ssl_manager.h index 7ee110e..e9916b3 100644 --- a/chrome/browser/ssl/ssl_manager.h +++ b/chrome/browser/ssl/ssl_manager.h @@ -56,11 +56,13 @@ class SSLManager : public NotificationObserver { // Convenience methods for serializing/deserializing the security info. static std::string SerializeSecurityInfo(int cert_id, int cert_status, - int security_bits); + int security_bits, + int connection_status); static bool DeserializeSecurityInfo(const std::string& state, int* cert_id, int* cert_status, - int* security_bits); + int* security_bits, + int* connection_status); // Returns "<organization_name> [<country>]". static std::wstring GetEVCertName(const net::X509Certificate& cert); |