| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 } | 187 } |
| 188 | 188 |
| 189 virtual int64 NumBytesRead() const OVERRIDE { | 189 virtual int64 NumBytesRead() const OVERRIDE { |
| 190 return -1; | 190 return -1; |
| 191 } | 191 } |
| 192 | 192 |
| 193 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE { | 193 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE { |
| 194 return base::TimeDelta::FromMicroseconds(-1); | 194 return base::TimeDelta::FromMicroseconds(-1); |
| 195 } | 195 } |
| 196 | 196 |
| 197 virtual NextProto GetNegotiatedProtocol() const { |
| 198 return kProtoUnknown; |
| 199 } |
| 200 |
| 197 private: | 201 private: |
| 198 net::BoundNetLog net_log_; | 202 net::BoundNetLog net_log_; |
| 199 FakeDataChannel* incoming_; | 203 FakeDataChannel* incoming_; |
| 200 FakeDataChannel* outgoing_; | 204 FakeDataChannel* outgoing_; |
| 201 | 205 |
| 202 DISALLOW_COPY_AND_ASSIGN(FakeSocket); | 206 DISALLOW_COPY_AND_ASSIGN(FakeSocket); |
| 203 }; | 207 }; |
| 204 | 208 |
| 205 } // namespace | 209 } // namespace |
| 206 | 210 |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 unsigned char client_bad[kKeyingMaterialSize]; | 472 unsigned char client_bad[kKeyingMaterialSize]; |
| 469 rv = client_socket_->ExportKeyingMaterial(kKeyingLabelBad, | 473 rv = client_socket_->ExportKeyingMaterial(kKeyingLabelBad, |
| 470 false, kKeyingContext, | 474 false, kKeyingContext, |
| 471 client_bad, sizeof(client_bad)); | 475 client_bad, sizeof(client_bad)); |
| 472 ASSERT_EQ(rv, net::OK); | 476 ASSERT_EQ(rv, net::OK); |
| 473 EXPECT_TRUE(memcmp(server_out, client_bad, sizeof(server_out)) != 0); | 477 EXPECT_TRUE(memcmp(server_out, client_bad, sizeof(server_out)) != 0); |
| 474 } | 478 } |
| 475 #endif | 479 #endif |
| 476 | 480 |
| 477 } // namespace net | 481 } // namespace net |
| OLD | NEW |