summaryrefslogtreecommitdiffstats
path: root/net/base/ssl_cipher_suite_names.cc
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-27 23:28:35 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-27 23:28:35 +0000
commit757f2e2ba0c1fa7100461745bfac865e3da1d976 (patch)
tree5ada8a2ea4122f949104663b3a02c54c3ba31720 /net/base/ssl_cipher_suite_names.cc
parent017f19b5f1af1702252655b4b52bdcd9ab7a0de2 (diff)
downloadchromium_src-757f2e2ba0c1fa7100461745bfac865e3da1d976.zip
chromium_src-757f2e2ba0c1fa7100461745bfac865e3da1d976.tar.gz
chromium_src-757f2e2ba0c1fa7100461745bfac865e3da1d976.tar.bz2
Report the SSL protocol version in ssl_info.connection_status.
Refactor SSLClientSocketNSS::GetSSLInfo -- the code that sets ssl_info->connection_status is moved to a new UpdateConnectionStatus method, and CheckSecureRenegotiation is subsumed by UpdateConnectionStatus. R=agl,finnur BUG=53659 TEST=none Review URL: http://codereview.chromium.org/4198003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64178 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/ssl_cipher_suite_names.cc')
-rw-r--r--net/base/ssl_cipher_suite_names.cc26
1 files changed, 26 insertions, 0 deletions
diff --git a/net/base/ssl_cipher_suite_names.cc b/net/base/ssl_cipher_suite_names.cc
index 2db9a4b..39efd1c 100644
--- a/net/base/ssl_cipher_suite_names.cc
+++ b/net/base/ssl_cipher_suite_names.cc
@@ -6,6 +6,8 @@
#include <stdlib.h>
+#include "base/logging.h"
+#include "net/base/ssl_connection_status_flags.h"
// Rather than storing the names of all the ciphersuites we eliminate the
// redundancy and break each cipher suite into a key exchange method, cipher
@@ -346,4 +348,28 @@ void SSLCompressionToString(const char** name, uint8 compresssion) {
}
}
+void SSLVersionToString(const char** name, int ssl_version) {
+ switch (ssl_version) {
+ case SSL_CONNECTION_VERSION_SSL2:
+ *name = "SSL 2.0";
+ break;
+ case SSL_CONNECTION_VERSION_SSL3:
+ *name = "SSL 3.0";
+ break;
+ case SSL_CONNECTION_VERSION_TLS1:
+ *name = "TLS 1.0";
+ break;
+ case SSL_CONNECTION_VERSION_TLS1_1:
+ *name = "TLS 1.1";
+ break;
+ case SSL_CONNECTION_VERSION_TLS1_2:
+ *name = "TLS 1.2";
+ break;
+ default:
+ NOTREACHED();
+ *name = "???";
+ break;
+ }
+}
+
} // namespace net