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

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

Issue 10828294: Merge 151198 - Turn off TLS 1.1. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 years, 4 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_server_socket_nss.cc ('k') | net/url_request/url_request_unittest.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 key_string.length())); 320 key_string.length()));
321 321
322 scoped_ptr<crypto::RSAPrivateKey> private_key( 322 scoped_ptr<crypto::RSAPrivateKey> private_key(
323 crypto::RSAPrivateKey::CreateFromPrivateKeyInfo(key_vector)); 323 crypto::RSAPrivateKey::CreateFromPrivateKeyInfo(key_vector));
324 324
325 net::SSLConfig ssl_config; 325 net::SSLConfig ssl_config;
326 ssl_config.cached_info_enabled = false; 326 ssl_config.cached_info_enabled = false;
327 ssl_config.false_start_enabled = false; 327 ssl_config.false_start_enabled = false;
328 ssl_config.domain_bound_certs_enabled = false; 328 ssl_config.domain_bound_certs_enabled = false;
329 ssl_config.version_min = SSL_PROTOCOL_VERSION_SSL3; 329 ssl_config.version_min = SSL_PROTOCOL_VERSION_SSL3;
330 ssl_config.version_max = SSL_PROTOCOL_VERSION_TLS1_1; 330 ssl_config.version_max = SSL_PROTOCOL_VERSION_TLS1;
331 331
332 // Certificate provided by the host doesn't need authority. 332 // Certificate provided by the host doesn't need authority.
333 net::SSLConfig::CertAndStatus cert_and_status; 333 net::SSLConfig::CertAndStatus cert_and_status;
334 cert_and_status.cert_status = CERT_STATUS_AUTHORITY_INVALID; 334 cert_and_status.cert_status = CERT_STATUS_AUTHORITY_INVALID;
335 cert_and_status.der_cert = cert_der; 335 cert_and_status.der_cert = cert_der;
336 ssl_config.allowed_bad_certs.push_back(cert_and_status); 336 ssl_config.allowed_bad_certs.push_back(cert_and_status);
337 337
338 net::HostPortPair host_and_pair("unittest", 0); 338 net::HostPortPair host_and_pair("unittest", 0);
339 net::SSLClientSocketContext context; 339 net::SSLClientSocketContext context;
340 context.cert_verifier = cert_verifier_.get(); 340 context.cert_verifier = cert_verifier_.get();
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 unsigned char client_bad[kKeyingMaterialSize]; 569 unsigned char client_bad[kKeyingMaterialSize];
570 rv = client_socket_->ExportKeyingMaterial(kKeyingLabelBad, 570 rv = client_socket_->ExportKeyingMaterial(kKeyingLabelBad,
571 false, kKeyingContext, 571 false, kKeyingContext,
572 client_bad, sizeof(client_bad)); 572 client_bad, sizeof(client_bad));
573 ASSERT_EQ(rv, net::OK); 573 ASSERT_EQ(rv, net::OK);
574 EXPECT_NE(0, memcmp(server_out, client_bad, sizeof(server_out))); 574 EXPECT_NE(0, memcmp(server_out, client_bad, sizeof(server_out)));
575 } 575 }
576 #endif 576 #endif
577 577
578 } // namespace net 578 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_server_socket_nss.cc ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698