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

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

Issue 10454066: Move the core state machine of SSLClientSocketNSS into a thread-safe Core (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win_rel by not caching the current threads task runner. See added comment Created 8 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/sslinfo.c » ('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 #include "net/socket/ssl_client_socket.h" 5 #include "net/socket/ssl_client_socket.h"
6 6
7 #include "net/base/address_list.h" 7 #include "net/base/address_list.h"
8 #include "net/base/cert_test_util.h" 8 #include "net/base/cert_test_util.h"
9 #include "net/base/host_resolver.h" 9 #include "net/base/host_resolver.h"
10 #include "net/base/io_buffer.h" 10 #include "net/base/io_buffer.h"
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 int rv = transport->Connect(callback.callback()); 645 int rv = transport->Connect(callback.callback());
646 if (rv == net::ERR_IO_PENDING) 646 if (rv == net::ERR_IO_PENDING)
647 rv = callback.WaitForResult(); 647 rv = callback.WaitForResult();
648 EXPECT_EQ(net::OK, rv); 648 EXPECT_EQ(net::OK, rv);
649 649
650 scoped_ptr<net::SSLClientSocket> sock( 650 scoped_ptr<net::SSLClientSocket> sock(
651 CreateSSLClientSocket(transport, test_server.host_port_pair(), 651 CreateSSLClientSocket(transport, test_server.host_port_pair(),
652 kDefaultSSLConfig)); 652 kDefaultSSLConfig));
653 653
654 rv = sock->Connect(callback.callback()); 654 rv = sock->Connect(callback.callback());
655 if (rv == net::ERR_IO_PENDING)
656 rv = callback.WaitForResult();
655 EXPECT_EQ(net::ERR_SSL_PROTOCOL_ERROR, rv); 657 EXPECT_EQ(net::ERR_SSL_PROTOCOL_ERROR, rv);
656 } 658 }
657 659
658 // TODO(rsleevi): Not implemented for Schannel. As Schannel is only used when 660 // TODO(rsleevi): Not implemented for Schannel. As Schannel is only used when
659 // performing client authentication, it will not be tested here. 661 // performing client authentication, it will not be tested here.
660 TEST_F(SSLClientSocketTest, CipherSuiteDisables) { 662 TEST_F(SSLClientSocketTest, CipherSuiteDisables) {
661 // Rather than exhaustively disabling every RC4 ciphersuite defined at 663 // Rather than exhaustively disabling every RC4 ciphersuite defined at
662 // http://www.iana.org/assignments/tls-parameters/tls-parameters.xml, 664 // http://www.iana.org/assignments/tls-parameters/tls-parameters.xml,
663 // only disabling those cipher suites that the test server actually 665 // only disabling those cipher suites that the test server actually
664 // implements. 666 // implements.
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 ssl_info.cert->os_cert_handle(), certs[0]->os_cert_handle())); 918 ssl_info.cert->os_cert_handle(), certs[0]->os_cert_handle()));
917 EXPECT_TRUE(net::X509Certificate::IsSameOSCert( 919 EXPECT_TRUE(net::X509Certificate::IsSameOSCert(
918 intermediates[0], certs[1]->os_cert_handle())); 920 intermediates[0], certs[1]->os_cert_handle()));
919 EXPECT_TRUE(net::X509Certificate::IsSameOSCert( 921 EXPECT_TRUE(net::X509Certificate::IsSameOSCert(
920 intermediates[1], certs[2]->os_cert_handle())); 922 intermediates[1], certs[2]->os_cert_handle()));
921 923
922 sock->Disconnect(); 924 sock->Disconnect();
923 EXPECT_FALSE(sock->IsConnected()); 925 EXPECT_FALSE(sock->IsConnected());
924 } 926 }
925 927
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_nss.cc ('k') | net/third_party/nss/ssl/sslinfo.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698