Chromium Code Reviews| Index: net/socket/ssl_client_socket_unittest.cc |
| diff --git a/net/socket/ssl_client_socket_unittest.cc b/net/socket/ssl_client_socket_unittest.cc |
| index 4b74ca0b93dd6caa20495c7efd8614df05c70f16..72a27abecd4d10fe1dffad4c1ce546e6b2a0ee26 100644 |
| --- a/net/socket/ssl_client_socket_unittest.cc |
| +++ b/net/socket/ssl_client_socket_unittest.cc |
| @@ -2203,7 +2203,9 @@ TEST_F(SSLClientSocketTest, CipherSuiteDisables) { |
| // http://www.iana.org/assignments/tls-parameters/tls-parameters.xml, |
| // only disabling those cipher suites that the test server actually |
| // implements. |
| - const uint16 kCiphersToDisable[] = {0x0005, // TLS_RSA_WITH_RC4_128_SHA |
| + const uint16 kCiphersToDisable[] = { |
| + 0x0005, // TLS_RSA_WITH_RC4_128_SHA |
| + 0xc011, // TLS_ECDHE_RSA_WITH_RC4_128_SHA |
| }; |
| SpawnedTestServer::SSLOptions ssl_options; |
| @@ -2881,10 +2883,10 @@ TEST_F(SSLClientSocketFalseStartTest, FalseStartEnabled) { |
| return; |
| } |
| - // False Start requires NPN/ALPN, perfect forward secrecy, and an AEAD. |
| + // False Start requires NPN/ALPN, ECDHE, and an AEAD. |
| SpawnedTestServer::SSLOptions server_options; |
| server_options.key_exchanges = |
| - SpawnedTestServer::SSLOptions::KEY_EXCHANGE_DHE_RSA; |
| + SpawnedTestServer::SSLOptions::KEY_EXCHANGE_ECDHE_RSA; |
| server_options.bulk_ciphers = |
| SpawnedTestServer::SSLOptions::BULK_CIPHER_AES128GCM; |
| server_options.enable_npn = true; |
| @@ -2903,7 +2905,7 @@ TEST_F(SSLClientSocketFalseStartTest, NoNPN) { |
| SpawnedTestServer::SSLOptions server_options; |
| server_options.key_exchanges = |
| - SpawnedTestServer::SSLOptions::KEY_EXCHANGE_DHE_RSA; |
| + SpawnedTestServer::SSLOptions::KEY_EXCHANGE_ECDHE_RSA; |
| server_options.bulk_ciphers = |
| SpawnedTestServer::SSLOptions::BULK_CIPHER_AES128GCM; |
| SSLConfig client_config; |
| @@ -2913,7 +2915,7 @@ TEST_F(SSLClientSocketFalseStartTest, NoNPN) { |
| } |
| // Test that False Start is disabled without perfect forward secrecy. |
| -TEST_F(SSLClientSocketFalseStartTest, NoForwardSecrecy) { |
| +TEST_F(SSLClientSocketFalseStartTest, RSA) { |
| if (!SupportsAESGCM()) { |
| LOG(WARNING) << "Skipping test because AES-GCM is not supported."; |
| return; |
| @@ -2931,11 +2933,29 @@ TEST_F(SSLClientSocketFalseStartTest, NoForwardSecrecy) { |
| TestFalseStart(server_options, client_config, false)); |
| } |
| +// Test that False Start is disabled without perfect forward secrecy. |
|
Ryan Sleevi
2015/04/02 00:42:58
Is this comment correct? DHE is PFS
davidben
2015/04/02 16:48:31
Done.
|
| +TEST_F(SSLClientSocketFalseStartTest, DHE_RSA) { |
| + if (!SupportsAESGCM()) { |
| + LOG(WARNING) << "Skipping test because AES-GCM is not supported."; |
| + return; |
| + } |
| + |
| + SpawnedTestServer::SSLOptions server_options; |
| + server_options.key_exchanges = |
| + SpawnedTestServer::SSLOptions::KEY_EXCHANGE_DHE_RSA; |
| + server_options.bulk_ciphers = |
| + SpawnedTestServer::SSLOptions::BULK_CIPHER_AES128GCM; |
| + server_options.enable_npn = true; |
| + SSLConfig client_config; |
| + client_config.next_protos.push_back(kProtoHTTP11); |
| + ASSERT_NO_FATAL_FAILURE(TestFalseStart(server_options, client_config, false)); |
| +} |
| + |
| // Test that False Start is disabled without an AEAD. |
| TEST_F(SSLClientSocketFalseStartTest, NoAEAD) { |
| SpawnedTestServer::SSLOptions server_options; |
| server_options.key_exchanges = |
| - SpawnedTestServer::SSLOptions::KEY_EXCHANGE_DHE_RSA; |
| + SpawnedTestServer::SSLOptions::KEY_EXCHANGE_ECDHE_RSA; |
| server_options.bulk_ciphers = |
| SpawnedTestServer::SSLOptions::BULK_CIPHER_AES128; |
| server_options.enable_npn = true; |
| @@ -2954,7 +2974,7 @@ TEST_F(SSLClientSocketFalseStartTest, SessionResumption) { |
| // Start a server. |
| SpawnedTestServer::SSLOptions server_options; |
| server_options.key_exchanges = |
| - SpawnedTestServer::SSLOptions::KEY_EXCHANGE_DHE_RSA; |
| + SpawnedTestServer::SSLOptions::KEY_EXCHANGE_ECDHE_RSA; |
| server_options.bulk_ciphers = |
| SpawnedTestServer::SSLOptions::BULK_CIPHER_AES128GCM; |
| server_options.enable_npn = true; |
| @@ -2992,7 +3012,7 @@ TEST_F(SSLClientSocketFalseStartTest, NoSessionResumptionBeforeFinish) { |
| // Start a server. |
| SpawnedTestServer::SSLOptions server_options; |
| server_options.key_exchanges = |
| - SpawnedTestServer::SSLOptions::KEY_EXCHANGE_DHE_RSA; |
| + SpawnedTestServer::SSLOptions::KEY_EXCHANGE_ECDHE_RSA; |
| server_options.bulk_ciphers = |
| SpawnedTestServer::SSLOptions::BULK_CIPHER_AES128GCM; |
| server_options.enable_npn = true; |