Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 194 } | 194 } |
| 195 | 195 |
| 196 virtual bool IsConnected() const OVERRIDE { | 196 virtual bool IsConnected() const OVERRIDE { |
| 197 return true; | 197 return true; |
| 198 } | 198 } |
| 199 | 199 |
| 200 virtual bool IsConnectedAndIdle() const OVERRIDE { | 200 virtual bool IsConnectedAndIdle() const OVERRIDE { |
| 201 return true; | 201 return true; |
| 202 } | 202 } |
| 203 | 203 |
| 204 virtual int GetPeerAddress(AddressList* address) const OVERRIDE { | 204 virtual int GetPeerAddress(IPEndPoint* address) const OVERRIDE { |
| 205 net::IPAddressNumber ip_address(4); | 205 net::IPAddressNumber ip_address(4); |
|
szym
2012/06/07 02:42:47
net::kIPv4AddressSize
| |
| 206 *address = net::AddressList::CreateFromIPAddress(ip_address, 0 /*port*/); | 206 *address = net::IPEndPoint(ip_address, 0 /*port*/); |
| 207 return net::OK; | 207 return net::OK; |
| 208 } | 208 } |
| 209 | 209 |
| 210 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE { | 210 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE { |
| 211 net::IPAddressNumber ip_address(4); | 211 net::IPAddressNumber ip_address(4); |
| 212 *address = net::IPEndPoint(ip_address, 0); | 212 *address = net::IPEndPoint(ip_address, 0); |
| 213 return net::OK; | 213 return net::OK; |
| 214 } | 214 } |
| 215 | 215 |
| 216 virtual const BoundNetLog& NetLog() const OVERRIDE { | 216 virtual const BoundNetLog& NetLog() const OVERRIDE { |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 |
| OLD | NEW |