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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 } | 229 } |
230 | 230 |
231 virtual int64 NumBytesRead() const OVERRIDE { | 231 virtual int64 NumBytesRead() const OVERRIDE { |
232 return -1; | 232 return -1; |
233 } | 233 } |
234 | 234 |
235 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE { | 235 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE { |
236 return base::TimeDelta::FromMicroseconds(-1); | 236 return base::TimeDelta::FromMicroseconds(-1); |
237 } | 237 } |
238 | 238 |
| 239 virtual bool WasNpnNegotiated() const { |
| 240 return false; |
| 241 } |
| 242 |
239 virtual NextProto GetNegotiatedProtocol() const { | 243 virtual NextProto GetNegotiatedProtocol() const { |
240 return kProtoUnknown; | 244 return kProtoUnknown; |
241 } | 245 } |
242 | 246 |
| 247 virtual bool GetSSLInfo(SSLInfo* ssl_info) { |
| 248 return false; |
| 249 } |
| 250 |
243 private: | 251 private: |
244 net::BoundNetLog net_log_; | 252 net::BoundNetLog net_log_; |
245 FakeDataChannel* incoming_; | 253 FakeDataChannel* incoming_; |
246 FakeDataChannel* outgoing_; | 254 FakeDataChannel* outgoing_; |
247 | 255 |
248 DISALLOW_COPY_AND_ASSIGN(FakeSocket); | 256 DISALLOW_COPY_AND_ASSIGN(FakeSocket); |
249 }; | 257 }; |
250 | 258 |
251 } // namespace | 259 } // namespace |
252 | 260 |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 unsigned char client_bad[kKeyingMaterialSize]; | 577 unsigned char client_bad[kKeyingMaterialSize]; |
570 rv = client_socket_->ExportKeyingMaterial(kKeyingLabelBad, | 578 rv = client_socket_->ExportKeyingMaterial(kKeyingLabelBad, |
571 false, kKeyingContext, | 579 false, kKeyingContext, |
572 client_bad, sizeof(client_bad)); | 580 client_bad, sizeof(client_bad)); |
573 ASSERT_EQ(rv, net::OK); | 581 ASSERT_EQ(rv, net::OK); |
574 EXPECT_NE(0, memcmp(server_out, client_bad, sizeof(server_out))); | 582 EXPECT_NE(0, memcmp(server_out, client_bad, sizeof(server_out))); |
575 } | 583 } |
576 #endif | 584 #endif |
577 | 585 |
578 } // namespace net | 586 } // namespace net |
OLD | NEW |