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

Side by Side Diff: net/socket/ssl_server_socket_unittest.cc

Issue 7058049: Added client-side support for the TLS cached info extension. This feature is disabled by default ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/socket/ssl_client_socket_nss.cc ('k') | net/third_party/nss/ssl.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This test suite uses SSLClientSocket to test the implementation of 5 // This test suite uses SSLClientSocket to test the implementation of
6 // SSLServerSocket. In order to establish connections between the sockets 6 // SSLServerSocket. In order to establish connections between the sockets
7 // we need two additional classes: 7 // we need two additional classes:
8 // 1. FakeSocket 8 // 1. FakeSocket
9 // Connects SSL socket to FakeDataChannel. This class is just a stub. 9 // Connects SSL socket to FakeDataChannel. This class is just a stub.
10 // 10 //
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 ASSERT_TRUE(file_util::ReadFileToString(key_path, &key_string)); 239 ASSERT_TRUE(file_util::ReadFileToString(key_path, &key_string));
240 std::vector<uint8> key_vector( 240 std::vector<uint8> key_vector(
241 reinterpret_cast<const uint8*>(key_string.data()), 241 reinterpret_cast<const uint8*>(key_string.data()),
242 reinterpret_cast<const uint8*>(key_string.data() + 242 reinterpret_cast<const uint8*>(key_string.data() +
243 key_string.length())); 243 key_string.length()));
244 244
245 scoped_ptr<crypto::RSAPrivateKey> private_key( 245 scoped_ptr<crypto::RSAPrivateKey> private_key(
246 crypto::RSAPrivateKey::CreateFromPrivateKeyInfo(key_vector)); 246 crypto::RSAPrivateKey::CreateFromPrivateKeyInfo(key_vector));
247 247
248 net::SSLConfig ssl_config; 248 net::SSLConfig ssl_config;
249 ssl_config.cached_info_enabled = false;
249 ssl_config.false_start_enabled = false; 250 ssl_config.false_start_enabled = false;
250 ssl_config.ssl3_enabled = true; 251 ssl_config.ssl3_enabled = true;
251 ssl_config.tls1_enabled = true; 252 ssl_config.tls1_enabled = true;
252 253
253 // Certificate provided by the host doesn't need authority. 254 // Certificate provided by the host doesn't need authority.
254 net::SSLConfig::CertAndStatus cert_and_status; 255 net::SSLConfig::CertAndStatus cert_and_status;
255 cert_and_status.cert_status = CERT_STATUS_AUTHORITY_INVALID; 256 cert_and_status.cert_status = CERT_STATUS_AUTHORITY_INVALID;
256 cert_and_status.cert = cert; 257 cert_and_status.cert = cert;
257 ssl_config.allowed_bad_certs.push_back(cert_and_status); 258 ssl_config.allowed_bad_certs.push_back(cert_and_status);
258 259
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 EXPECT_GT(read_callback.WaitForResult(), 0); 367 EXPECT_GT(read_callback.WaitForResult(), 0);
367 } 368 }
368 if (client_ret == net::ERR_IO_PENDING) { 369 if (client_ret == net::ERR_IO_PENDING) {
369 EXPECT_GT(write_callback.WaitForResult(), 0); 370 EXPECT_GT(write_callback.WaitForResult(), 0);
370 } 371 }
371 EXPECT_EQ(0, memcmp(write_buf->data(), read_buf->data(), write_buf->size())); 372 EXPECT_EQ(0, memcmp(write_buf->data(), read_buf->data(), write_buf->size()));
372 } 373 }
373 #endif 374 #endif
374 375
375 } // namespace net 376 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_nss.cc ('k') | net/third_party/nss/ssl.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698