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

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

Issue 1074193003: Verify alternative server certificate validity for origin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re: comments #7. Created 5 years, 8 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
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 #ifndef NET_SOCKET_SOCKET_TEST_UTIL_H_ 5 #ifndef NET_SOCKET_SOCKET_TEST_UTIL_H_
6 #define NET_SOCKET_SOCKET_TEST_UTIL_H_ 6 #define NET_SOCKET_SOCKET_TEST_UTIL_H_
7 7
8 #include <cstring> 8 #include <cstring>
9 #include <deque> 9 #include <deque>
10 #include <string> 10 #include <string>
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 DISALLOW_COPY_AND_ASSIGN(DynamicSocketDataProvider); 339 DISALLOW_COPY_AND_ASSIGN(DynamicSocketDataProvider);
340 }; 340 };
341 341
342 // SSLSocketDataProviders only need to keep track of the return code from calls 342 // SSLSocketDataProviders only need to keep track of the return code from calls
343 // to Connect(). 343 // to Connect().
344 struct SSLSocketDataProvider { 344 struct SSLSocketDataProvider {
345 SSLSocketDataProvider(IoMode mode, int result); 345 SSLSocketDataProvider(IoMode mode, int result);
346 ~SSLSocketDataProvider(); 346 ~SSLSocketDataProvider();
347 347
348 void SetNextProto(NextProto proto); 348 void SetNextProto(NextProto proto);
349 void SetCertFromFile(const std::string& cert_filename);
349 350
350 MockConnect connect; 351 MockConnect connect;
351 SSLClientSocket::NextProtoStatus next_proto_status; 352 SSLClientSocket::NextProtoStatus next_proto_status;
352 std::string next_proto; 353 std::string next_proto;
353 bool was_npn_negotiated; 354 bool was_npn_negotiated;
354 NextProto protocol_negotiated; 355 NextProto protocol_negotiated;
355 NextProtoVector next_protos_expected_in_ssl_config; 356 NextProtoVector next_protos_expected_in_ssl_config;
356 bool client_cert_sent; 357 bool client_cert_sent;
357 SSLCertRequestInfo* cert_request_info; 358 SSLCertRequestInfo* cert_request_info;
358 scoped_refptr<X509Certificate> cert; 359 scoped_refptr<X509Certificate> cert;
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
1316 1317
1317 extern const char kSOCKS5OkRequest[]; 1318 extern const char kSOCKS5OkRequest[];
1318 extern const int kSOCKS5OkRequestLength; 1319 extern const int kSOCKS5OkRequestLength;
1319 1320
1320 extern const char kSOCKS5OkResponse[]; 1321 extern const char kSOCKS5OkResponse[];
1321 extern const int kSOCKS5OkResponseLength; 1322 extern const int kSOCKS5OkResponseLength;
1322 1323
1323 } // namespace net 1324 } // namespace net
1324 1325
1325 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ 1326 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698