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

Unified Diff: net/ssl/ssl_cipher_suite_names_unittest.cc

Issue 291093002: Fail the SPDY transaction if it does not meet TLS base requirements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address forgotten comment. Created 6 years, 7 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/ssl/ssl_cipher_suite_names.cc ('k') | net/ssl/ssl_connection_status_flags.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ssl/ssl_cipher_suite_names_unittest.cc
diff --git a/net/ssl/ssl_cipher_suite_names_unittest.cc b/net/ssl/ssl_cipher_suite_names_unittest.cc
index a9133fb67ea2ea729af607c6fe0e6797148011f3..042ca82a5d3b1473a8f7f53b57e52acdb4d13961 100644
--- a/net/ssl/ssl_cipher_suite_names_unittest.cc
+++ b/net/ssl/ssl_cipher_suite_names_unittest.cc
@@ -56,6 +56,22 @@ TEST(CipherSuiteNamesTest, ParseSSLCipherStringFails) {
}
}
+TEST(CipherSuiteNamesTest, SecureCipherSuites) {
+ // Picked some random cipher suites.
+ EXPECT_FALSE(IsSecureTLSCipherSuite(0x0));
+ EXPECT_FALSE(IsSecureTLSCipherSuite(0x39));
+ EXPECT_FALSE(IsSecureTLSCipherSuite(0xc5));
+ EXPECT_FALSE(IsSecureTLSCipherSuite(0xc00f));
+ EXPECT_FALSE(IsSecureTLSCipherSuite(0xc083));
+
+ // Non-existent cipher suite.
+ EXPECT_FALSE(IsSecureTLSCipherSuite(0xffff)) << "Doesn't exist!";
+
+ // Secure ones.
+ EXPECT_TRUE(IsSecureTLSCipherSuite(0xcc13));
+ EXPECT_TRUE(IsSecureTLSCipherSuite(0xcc14));
+}
+
} // anonymous namespace
} // namespace net
« no previous file with comments | « net/ssl/ssl_cipher_suite_names.cc ('k') | net/ssl/ssl_connection_status_flags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698