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

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

Issue 10823084: Add a new GetTlsUniqueChannelBinding method to SSLSocket, and implement nss version. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
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 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 710
711 int MockClientSocket::ExportKeyingMaterial(const base::StringPiece& label, 711 int MockClientSocket::ExportKeyingMaterial(const base::StringPiece& label,
712 bool has_context, 712 bool has_context,
713 const base::StringPiece& context, 713 const base::StringPiece& context,
714 unsigned char* out, 714 unsigned char* out,
715 unsigned int outlen) { 715 unsigned int outlen) {
716 memset(out, 'A', outlen); 716 memset(out, 'A', outlen);
717 return OK; 717 return OK;
718 } 718 }
719 719
720 int MockClientSocket::GetTlsUniqueChannelBinding(unsigned char* out,
721 unsigned int *outlen,
722 unsigned int outlen_max) {
723 memset(out, 'B', outlen_max);
724 *outlen = outlen_max;
wtc 2012/07/30 20:05:08 I wonder if we should memset 12 bytes and store 12
Ryan Hamilton 2012/07/30 21:37:58 Done.
725 return OK;
726 }
727
720 ServerBoundCertService* MockClientSocket::GetServerBoundCertService() const { 728 ServerBoundCertService* MockClientSocket::GetServerBoundCertService() const {
721 NOTREACHED(); 729 NOTREACHED();
722 return NULL; 730 return NULL;
723 } 731 }
724 732
725 SSLClientSocket::NextProtoStatus 733 SSLClientSocket::NextProtoStatus
726 MockClientSocket::GetNextProto(std::string* proto, std::string* server_protos) { 734 MockClientSocket::GetNextProto(std::string* proto, std::string* server_protos) {
727 proto->clear(); 735 proto->clear();
728 server_protos->clear(); 736 server_protos->clear();
729 return SSLClientSocket::kNextProtoUnsupported; 737 return SSLClientSocket::kNextProtoUnsupported;
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
1656 1664
1657 const char kSOCKS5OkRequest[] = 1665 const char kSOCKS5OkRequest[] =
1658 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; 1666 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 };
1659 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); 1667 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest);
1660 1668
1661 const char kSOCKS5OkResponse[] = 1669 const char kSOCKS5OkResponse[] =
1662 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; 1670 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 };
1663 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); 1671 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse);
1664 1672
1665 } // namespace net 1673 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698