OLD | NEW |
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 Loading... |
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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 return 0; | 356 return 0; |
360 } else { | 357 } else { |
361 cout << "Request failed (redirect " << response_code << ")." << endl; | 358 cout << "Request failed (redirect " << response_code << ")." << endl; |
362 return 1; | 359 return 1; |
363 } | 360 } |
364 } else { | 361 } else { |
365 cerr << "Request failed (" << response_code << ")." << endl; | 362 cerr << "Request failed (" << response_code << ")." << endl; |
366 return 1; | 363 return 1; |
367 } | 364 } |
368 } | 365 } |
OLD | NEW |