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

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

Issue 9478016: Merge 123620 - Set SSLInfo.client_cert_sent when origin bound cert was sent. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1025/src/
Patch Set: Created 8 years, 9 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 | « no previous file | net/socket/ssl_client_socket_mac.cc » ('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/socket_test_util.h" 5 #include "net/socket/socket_test_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 return -1; 1112 return -1;
1113 } 1113 }
1114 1114
1115 base::TimeDelta MockSSLClientSocket::GetConnectTimeMicros() const { 1115 base::TimeDelta MockSSLClientSocket::GetConnectTimeMicros() const {
1116 return base::TimeDelta::FromMicroseconds(-1); 1116 return base::TimeDelta::FromMicroseconds(-1);
1117 } 1117 }
1118 1118
1119 void MockSSLClientSocket::GetSSLInfo(SSLInfo* ssl_info) { 1119 void MockSSLClientSocket::GetSSLInfo(SSLInfo* ssl_info) {
1120 ssl_info->Reset(); 1120 ssl_info->Reset();
1121 ssl_info->cert = data_->cert; 1121 ssl_info->cert = data_->cert;
1122 ssl_info->client_cert_sent = data_->client_cert_sent; 1122 ssl_info->client_cert_sent = WasOriginBoundCertSent() ||
1123 data_->client_cert_sent;
1123 } 1124 }
1124 1125
1125 void MockSSLClientSocket::GetSSLCertRequestInfo( 1126 void MockSSLClientSocket::GetSSLCertRequestInfo(
1126 SSLCertRequestInfo* cert_request_info) { 1127 SSLCertRequestInfo* cert_request_info) {
1127 DCHECK(cert_request_info); 1128 DCHECK(cert_request_info);
1128 if (data_->cert_request_info) { 1129 if (data_->cert_request_info) {
1129 cert_request_info->host_and_port = 1130 cert_request_info->host_and_port =
1130 data_->cert_request_info->host_and_port; 1131 data_->cert_request_info->host_and_port;
1131 cert_request_info->client_certs = data_->cert_request_info->client_certs; 1132 cert_request_info->client_certs = data_->cert_request_info->client_certs;
1132 } else { 1133 } else {
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
1589 1590
1590 const char kSOCKS5OkRequest[] = 1591 const char kSOCKS5OkRequest[] =
1591 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; 1592 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 };
1592 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); 1593 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest);
1593 1594
1594 const char kSOCKS5OkResponse[] = 1595 const char kSOCKS5OkResponse[] =
1595 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; 1596 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 };
1596 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); 1597 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse);
1597 1598
1598 } // namespace net 1599 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/socket/ssl_client_socket_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698