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

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

Issue 2337253004: Update Token Binding code to the latest drafts (Closed)
Patch Set: Add call to CBS_len() Created 4 years, 3 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
« no previous file with comments | « net/socket/socket_test_util.h ('k') | net/socket/ssl_client_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 #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 <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 unsigned int outlen) { 826 unsigned int outlen) {
827 memset(out, 'A', outlen); 827 memset(out, 'A', outlen);
828 return OK; 828 return OK;
829 } 829 }
830 830
831 ChannelIDService* MockClientSocket::GetChannelIDService() const { 831 ChannelIDService* MockClientSocket::GetChannelIDService() const {
832 NOTREACHED(); 832 NOTREACHED();
833 return NULL; 833 return NULL;
834 } 834 }
835 835
836 Error MockClientSocket::GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, 836 Error MockClientSocket::GetTokenBindingSignature(crypto::ECPrivateKey* key,
837 std::vector<uint8_t>* out) { 837 TokenBindingType tb_type,
838 std::vector<uint8_t>* out) {
838 NOTREACHED(); 839 NOTREACHED();
839 return ERR_NOT_IMPLEMENTED; 840 return ERR_NOT_IMPLEMENTED;
840 } 841 }
841 842
842 crypto::ECPrivateKey* MockClientSocket::GetChannelIDKey() const { 843 crypto::ECPrivateKey* MockClientSocket::GetChannelIDKey() const {
843 NOTREACHED(); 844 NOTREACHED();
844 return NULL; 845 return NULL;
845 } 846 }
846 847
847 MockClientSocket::~MockClientSocket() {} 848 MockClientSocket::~MockClientSocket() {}
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 cert_request_info->client_certs = data_->cert_request_info->client_certs; 1223 cert_request_info->client_certs = data_->cert_request_info->client_certs;
1223 } else { 1224 } else {
1224 cert_request_info->Reset(); 1225 cert_request_info->Reset();
1225 } 1226 }
1226 } 1227 }
1227 1228
1228 ChannelIDService* MockSSLClientSocket::GetChannelIDService() const { 1229 ChannelIDService* MockSSLClientSocket::GetChannelIDService() const {
1229 return data_->channel_id_service; 1230 return data_->channel_id_service;
1230 } 1231 }
1231 1232
1232 Error MockSSLClientSocket::GetSignedEKMForTokenBinding( 1233 Error MockSSLClientSocket::GetTokenBindingSignature(crypto::ECPrivateKey* key,
1233 crypto::ECPrivateKey* key, 1234 TokenBindingType tb_type,
1234 std::vector<uint8_t>* out) { 1235 std::vector<uint8_t>* out) {
1235 out->push_back('A'); 1236 out->push_back('A');
1236 return OK; 1237 return OK;
1237 } 1238 }
1238 1239
1239 void MockSSLClientSocket::OnReadComplete(const MockRead& data) { 1240 void MockSSLClientSocket::OnReadComplete(const MockRead& data) {
1240 NOTIMPLEMENTED(); 1241 NOTIMPLEMENTED();
1241 } 1242 }
1242 1243
1243 void MockSSLClientSocket::OnWriteComplete(int rv) { 1244 void MockSSLClientSocket::OnWriteComplete(int rv) {
1244 NOTIMPLEMENTED(); 1245 NOTIMPLEMENTED();
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 } 1733 }
1733 1734
1734 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size) { 1735 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size) {
1735 int64_t total = 0; 1736 int64_t total = 0;
1736 for (const MockWrite* write = writes; write != writes + writes_size; ++write) 1737 for (const MockWrite* write = writes; write != writes + writes_size; ++write)
1737 total += write->data_len; 1738 total += write->data_len;
1738 return total; 1739 return total;
1739 } 1740 }
1740 1741
1741 } // namespace net 1742 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/socket_test_util.h ('k') | net/socket/ssl_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698