From 302b6275fcab63960e52fdb2d9e48b957a8ae7d6 Mon Sep 17 00:00:00 2001 From: "wtc@chromium.org" Date: Wed, 19 Jan 2011 01:27:22 +0000 Subject: The SSL server's RSA private key must be imported with the KU_KEY_ENCIPHERMENT key usage to support the RSA key exchange algorithm. Remove the incorrect workarounds for this bug. In the SSLServerSocketTest.DataTransfer unit test, do not proceed to data transfer if the SSL connection cannot be established. Not required for fixing this bug: create an RSA private key with all applicable key usage bits to be future-proof. R=hclam BUG=67928 TEST=net_unittests --gtest_filter=SSLServerSocketTest.* Review URL: http://codereview.chromium.org/6297008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71739 0039d316-1c4b-4281-b951-d872f2087c98 --- net/socket/ssl_server_socket_unittest.cc | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'net/socket/ssl_server_socket_unittest.cc') diff --git a/net/socket/ssl_server_socket_unittest.cc b/net/socket/ssl_server_socket_unittest.cc index 781a3f4..ca2c884 100644 --- a/net/socket/ssl_server_socket_unittest.cc +++ b/net/socket/ssl_server_socket_unittest.cc @@ -283,9 +283,6 @@ TEST_F(SSLServerSocketTest, Initialize) { TEST_F(SSLServerSocketTest, Handshake) { Initialize(); - if (!base::CheckNSSVersion("3.12.8")) - return; - TestCompletionCallback connect_callback; TestCompletionCallback accept_callback; @@ -306,24 +303,21 @@ TEST_F(SSLServerSocketTest, Handshake) { TEST_F(SSLServerSocketTest, DataTransfer) { Initialize(); - if (!base::CheckNSSVersion("3.12.8")) - return; - TestCompletionCallback connect_callback; TestCompletionCallback accept_callback; // Establish connection. int client_ret = client_socket_->Connect(&connect_callback); - EXPECT_TRUE(client_ret == net::OK || client_ret == net::ERR_IO_PENDING); + ASSERT_TRUE(client_ret == net::OK || client_ret == net::ERR_IO_PENDING); int server_ret = server_socket_->Accept(&accept_callback); - EXPECT_TRUE(server_ret == net::OK || server_ret == net::ERR_IO_PENDING); + ASSERT_TRUE(server_ret == net::OK || server_ret == net::ERR_IO_PENDING); if (client_ret == net::ERR_IO_PENDING) { - EXPECT_EQ(net::OK, connect_callback.WaitForResult()); + ASSERT_EQ(net::OK, connect_callback.WaitForResult()); } if (server_ret == net::ERR_IO_PENDING) { - EXPECT_EQ(net::OK, accept_callback.WaitForResult()); + ASSERT_EQ(net::OK, accept_callback.WaitForResult()); } const int kReadBufSize = 1024; -- cgit v1.1