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

Side by Side Diff: net/tools/quic/quic_client_bin.cc

Issue 1994353002: Update CertVerifier::Verify to use RequestParams instead (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@request_params
Patch Set: Rebased Created 4 years, 7 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 // A binary wrapper for QuicClient. 5 // A binary wrapper for QuicClient.
6 // Connects to a host using QUIC, sends a request to the provided URL, and 6 // Connects to a host using QUIC, sends a request to the provided URL, and
7 // displays the response. 7 // displays the response.
8 // 8 //
9 // Some usage examples: 9 // Some usage examples:
10 // 10 //
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // Useful for probing a server to determine if it speaks any version of QUIC. 100 // Useful for probing a server to determine if it speaks any version of QUIC.
101 bool FLAGS_version_mismatch_ok = false; 101 bool FLAGS_version_mismatch_ok = false;
102 // If true, an HTTP response code of 3xx is considered to be a successful 102 // If true, an HTTP response code of 3xx is considered to be a successful
103 // response, otherwise a failure. 103 // response, otherwise a failure.
104 bool FLAGS_redirect_is_success = true; 104 bool FLAGS_redirect_is_success = true;
105 // Initial MTU of the connection. 105 // Initial MTU of the connection.
106 int32_t FLAGS_initial_mtu = 0; 106 int32_t FLAGS_initial_mtu = 0;
107 107
108 class FakeCertVerifier : public net::CertVerifier { 108 class FakeCertVerifier : public net::CertVerifier {
109 public: 109 public:
110 int Verify(net::X509Certificate* cert, 110 int Verify(const net::CertVerifier::RequestParams& params,
111 const std::string& hostname,
112 const std::string& ocsp_response,
113 int flags,
114 net::CRLSet* crl_set, 111 net::CRLSet* crl_set,
115 net::CertVerifyResult* verify_result, 112 net::CertVerifyResult* verify_result,
116 const net::CompletionCallback& callback, 113 const net::CompletionCallback& callback,
117 std::unique_ptr<net::CertVerifier::Request>* out_req, 114 std::unique_ptr<net::CertVerifier::Request>* out_req,
118 const net::BoundNetLog& net_log) override { 115 const net::BoundNetLog& net_log) override {
119 return net::OK; 116 return net::OK;
120 } 117 }
121 118
122 // Returns true if this CertVerifier supports stapled OCSP responses. 119 // Returns true if this CertVerifier supports stapled OCSP responses.
123 bool SupportsOCSPStapling() override { return false; } 120 bool SupportsOCSPStapling() override { return false; }
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 return 0; 355 return 0;
359 } else { 356 } else {
360 cout << "Request failed (redirect " << response_code << ")." << endl; 357 cout << "Request failed (redirect " << response_code << ")." << endl;
361 return 1; 358 return 1;
362 } 359 }
363 } else { 360 } else {
364 cerr << "Request failed (" << response_code << ")." << endl; 361 cerr << "Request failed (" << response_code << ")." << endl;
365 return 1; 362 return 1;
366 } 363 }
367 } 364 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698