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

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

Issue 10491007: fixed issue 128383 - replace GetPeerAddress(AddressList* address) with GetPeerAddress(IPEndPoint* a… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix according to review 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_server_socket_nss.cc ('k') | net/socket/stream_socket.h » ('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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(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
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/socket/stream_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698