OLD | NEW |
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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/quic/quartc/quartc_session.h" | 5 #include "net/quic/quartc/quartc_session.h" |
6 | 6 |
7 #include "base/rand_util.h" | 7 #include "base/rand_util.h" |
8 | 8 |
9 namespace { | 9 namespace { |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 public: | 26 public: |
27 DummyProofSource() {} | 27 DummyProofSource() {} |
28 ~DummyProofSource() override {} | 28 ~DummyProofSource() override {} |
29 | 29 |
30 // ProofSource override. | 30 // ProofSource override. |
31 bool GetProof(const net::IPAddress& server_ip, | 31 bool GetProof(const net::IPAddress& server_ip, |
32 const std::string& hostname, | 32 const std::string& hostname, |
33 const std::string& server_config, | 33 const std::string& server_config, |
34 net::QuicVersion quic_version, | 34 net::QuicVersion quic_version, |
35 base::StringPiece chlo_hash, | 35 base::StringPiece chlo_hash, |
| 36 const net::QuicTagVector& connection_options, |
36 scoped_refptr<net::ProofSource::Chain>* out_chain, | 37 scoped_refptr<net::ProofSource::Chain>* out_chain, |
37 std::string* out_signature, | 38 std::string* out_signature, |
38 std::string* out_leaf_cert_sct) override { | 39 std::string* out_leaf_cert_sct) override { |
39 std::vector<std::string> certs; | 40 std::vector<std::string> certs; |
40 certs.push_back("Dummy cert"); | 41 certs.push_back("Dummy cert"); |
41 *out_chain = new ProofSource::Chain(certs); | 42 *out_chain = new ProofSource::Chain(certs); |
42 *out_signature = "Dummy signature"; | 43 *out_signature = "Dummy signature"; |
43 *out_leaf_cert_sct = "Dummy timestamp"; | 44 *out_leaf_cert_sct = "Dummy timestamp"; |
44 return true; | 45 return true; |
45 } | 46 } |
46 | 47 |
47 void GetProof(const net::IPAddress& server_ip, | 48 void GetProof(const net::IPAddress& server_ip, |
48 const std::string& hostname, | 49 const std::string& hostname, |
49 const std::string& server_config, | 50 const std::string& server_config, |
50 net::QuicVersion quic_version, | 51 net::QuicVersion quic_version, |
51 base::StringPiece chlo_hash, | 52 base::StringPiece chlo_hash, |
| 53 const net::QuicTagVector& connection_options, |
52 std::unique_ptr<Callback> callback) override {} | 54 std::unique_ptr<Callback> callback) override {} |
53 }; | 55 }; |
54 | 56 |
55 // Used by QuicCryptoClientConfig to ignore the peer's credentials | 57 // Used by QuicCryptoClientConfig to ignore the peer's credentials |
56 // and establish an insecure QUIC connection. | 58 // and establish an insecure QUIC connection. |
57 // TODO(zhihuang): Remove when secure P2P QUIC handshake is possible. | 59 // TODO(zhihuang): Remove when secure P2P QUIC handshake is possible. |
58 class InsecureProofVerifier : public net::ProofVerifier { | 60 class InsecureProofVerifier : public net::ProofVerifier { |
59 public: | 61 public: |
60 InsecureProofVerifier() {} | 62 InsecureProofVerifier() {} |
61 ~InsecureProofVerifier() override {} | 63 ~InsecureProofVerifier() override {} |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 ActivateStream(std::unique_ptr<ReliableQuicStream>(stream)); | 284 ActivateStream(std::unique_ptr<ReliableQuicStream>(stream)); |
283 // Register the stream to the QuicWriteBlockedList. |priority| is clamped | 285 // Register the stream to the QuicWriteBlockedList. |priority| is clamped |
284 // between 0 and 7, with 0 being the highest priority and 7 the lowest | 286 // between 0 and 7, with 0 being the highest priority and 7 the lowest |
285 // priority. | 287 // priority. |
286 write_blocked_streams()->RegisterStream(stream->id(), priority); | 288 write_blocked_streams()->RegisterStream(stream->id(), priority); |
287 } | 289 } |
288 return stream; | 290 return stream; |
289 } | 291 } |
290 | 292 |
291 } // namespace net | 293 } // namespace net |
OLD | NEW |