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

Side by Side Diff: net/quic/core/quic_crypto_server_stream_test.cc

Issue 2463093003: Landing Recent QUIC changes until Sat Oct 29 14:59:35. (Closed)
Patch Set: add change to quiartc_session_test.cc Created 4 years, 1 month 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 #include "net/quic/core/quic_crypto_server_stream.h" 5 #include "net/quic/core/quic_crypto_server_stream.h"
6 6
7 #include <map> 7 #include <map>
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 server_id_, QuicTime::Delta::FromSeconds(100000), supported_versions_, 107 server_id_, QuicTime::Delta::FromSeconds(100000), supported_versions_,
108 helpers_.back().get(), alarm_factories_.back().get(), 108 helpers_.back().get(), alarm_factories_.back().get(),
109 &server_crypto_config_, &server_compressed_certs_cache_, 109 &server_crypto_config_, &server_compressed_certs_cache_,
110 &server_connection_, &server_session); 110 &server_connection_, &server_session);
111 CHECK(server_session); 111 CHECK(server_session);
112 server_session_.reset(server_session); 112 server_session_.reset(server_session);
113 CryptoTestUtils::FakeServerOptions options; 113 CryptoTestUtils::FakeServerOptions options;
114 options.token_binding_params = QuicTagVector{kTB10}; 114 options.token_binding_params = QuicTagVector{kTB10};
115 CryptoTestUtils::SetupCryptoServerConfigForTest( 115 CryptoTestUtils::SetupCryptoServerConfigForTest(
116 server_connection_->clock(), server_connection_->random_generator(), 116 server_connection_->clock(), server_connection_->random_generator(),
117 server_session_->config(), &server_crypto_config_, options); 117 &server_crypto_config_, options);
118 } 118 }
119 119
120 QuicCryptoServerStream* server_stream() { 120 QuicCryptoServerStream* server_stream() {
121 return server_session_->GetCryptoStream(); 121 return server_session_->GetCryptoStream();
122 } 122 }
123 123
124 QuicCryptoClientStream* client_stream() { 124 QuicCryptoClientStream* client_stream() {
125 return client_session_->GetCryptoStream(); 125 return client_session_->GetCryptoStream();
126 } 126 }
127 127
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 strike_register_client_->RunPendingVerifications(); 576 strike_register_client_->RunPendingVerifications();
577 } 577 }
578 578
579 class FailingProofSource : public ProofSource { 579 class FailingProofSource : public ProofSource {
580 public: 580 public:
581 bool GetProof(const IPAddress& server_ip, 581 bool GetProof(const IPAddress& server_ip,
582 const string& hostname, 582 const string& hostname,
583 const string& server_config, 583 const string& server_config,
584 QuicVersion quic_version, 584 QuicVersion quic_version,
585 StringPiece chlo_hash, 585 StringPiece chlo_hash,
586 const QuicTagVector& connection_options,
586 scoped_refptr<ProofSource::Chain>* out_chain, 587 scoped_refptr<ProofSource::Chain>* out_chain,
587 string* out_signature, 588 string* out_signature,
588 string* out_leaf_cert_sct) override { 589 string* out_leaf_cert_sct) override {
589 return false; 590 return false;
590 } 591 }
591 592
592 void GetProof(const IPAddress& server_ip, 593 void GetProof(const IPAddress& server_ip,
593 const string& hostname, 594 const string& hostname,
594 const string& server_config, 595 const string& server_config,
595 QuicVersion quic_version, 596 QuicVersion quic_version,
596 StringPiece chlo_hash, 597 StringPiece chlo_hash,
598 const QuicTagVector& connection_options,
597 std::unique_ptr<Callback> callback) override { 599 std::unique_ptr<Callback> callback) override {
598 callback->Run(false, nullptr, "", "", nullptr); 600 callback->Run(false, nullptr, "", "", nullptr);
599 } 601 }
600 }; 602 };
601 603
602 class QuicCryptoServerStreamTestWithFailingProofSource 604 class QuicCryptoServerStreamTestWithFailingProofSource
603 : public QuicCryptoServerStreamTest { 605 : public QuicCryptoServerStreamTest {
604 public: 606 public:
605 QuicCryptoServerStreamTestWithFailingProofSource() 607 QuicCryptoServerStreamTestWithFailingProofSource()
606 : QuicCryptoServerStreamTest( 608 : QuicCryptoServerStreamTest(
(...skipping 11 matching lines...) Expand all
618 // Regression test for b/31521252, in which a crash would happen here. 620 // Regression test for b/31521252, in which a crash would happen here.
619 AdvanceHandshakeWithFakeClient(); 621 AdvanceHandshakeWithFakeClient();
620 EXPECT_FALSE(server_stream()->encryption_established()); 622 EXPECT_FALSE(server_stream()->encryption_established());
621 EXPECT_FALSE(server_stream()->handshake_confirmed()); 623 EXPECT_FALSE(server_stream()->handshake_confirmed());
622 } 624 }
623 625
624 } // namespace 626 } // namespace
625 627
626 } // namespace test 628 } // namespace test
627 } // namespace net 629 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_crypto_server_stream.cc ('k') | net/quic/core/quic_multipath_received_packet_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698