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

Side by Side Diff: net/quic/core/crypto/quic_crypto_server_config.cc

Issue 2516433002: Minor refactors to enable sending an Expect-CT header more easily. (Closed)
Patch Set: 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/crypto/quic_crypto_server_config.h" 5 #include "net/quic/core/crypto/quic_crypto_server_config.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 done_cb_(std::move(done_cb)) {} 624 done_cb_(std::move(done_cb)) {}
625 625
626 void Run(bool ok, 626 void Run(bool ok,
627 const scoped_refptr<ProofSource::Chain>& chain, 627 const scoped_refptr<ProofSource::Chain>& chain,
628 const QuicCryptoProof& proof, 628 const QuicCryptoProof& proof,
629 std::unique_ptr<ProofSource::Details> details) override { 629 std::unique_ptr<ProofSource::Details> details) override {
630 if (ok) { 630 if (ok) {
631 signed_config_->chain = chain; 631 signed_config_->chain = chain;
632 signed_config_->signature = proof.signature; 632 signed_config_->signature = proof.signature;
633 signed_config_->cert_sct = proof.leaf_cert_scts; 633 signed_config_->cert_sct = proof.leaf_cert_scts;
634 signed_config_->send_expect_ct_header = proof.send_expect_ct_header;
634 } 635 }
635 config_->ProcessClientHelloAfterGetProof( 636 config_->ProcessClientHelloAfterGetProof(
636 !ok, std::move(details), *validate_chlo_result_, reject_only_, 637 !ok, std::move(details), *validate_chlo_result_, reject_only_,
637 connection_id_, client_address_, version_, supported_versions_, 638 connection_id_, client_address_, version_, supported_versions_,
638 use_stateless_rejects_, server_designated_connection_id_, clock_, rand_, 639 use_stateless_rejects_, server_designated_connection_id_, clock_, rand_,
639 compressed_certs_cache_, params_, signed_config_, 640 compressed_certs_cache_, params_, signed_config_,
640 total_framing_overhead_, chlo_packet_size_, requested_config_, 641 total_framing_overhead_, chlo_packet_size_, requested_config_,
641 primary_config_, std::move(done_cb_)); 642 primary_config_, std::move(done_cb_));
642 } 643 }
643 644
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 done_cb_(std::move(done_cb)) {} 1226 done_cb_(std::move(done_cb)) {}
1226 1227
1227 void Run(bool ok, 1228 void Run(bool ok,
1228 const scoped_refptr<ProofSource::Chain>& chain, 1229 const scoped_refptr<ProofSource::Chain>& chain,
1229 const QuicCryptoProof& proof, 1230 const QuicCryptoProof& proof,
1230 std::unique_ptr<ProofSource::Details> details) override { 1231 std::unique_ptr<ProofSource::Details> details) override {
1231 if (ok) { 1232 if (ok) {
1232 signed_config_->chain = chain; 1233 signed_config_->chain = chain;
1233 signed_config_->signature = proof.signature; 1234 signed_config_->signature = proof.signature;
1234 signed_config_->cert_sct = proof.leaf_cert_scts; 1235 signed_config_->cert_sct = proof.leaf_cert_scts;
1236 signed_config_->send_expect_ct_header = proof.send_expect_ct_header;
1235 } 1237 }
1236 config_.EvaluateClientHelloAfterGetProof( 1238 config_.EvaluateClientHelloAfterGetProof(
1237 found_error_, server_ip_, version_, requested_config_, primary_config_, 1239 found_error_, server_ip_, version_, requested_config_, primary_config_,
1238 signed_config_, std::move(details), !ok, client_hello_state_, 1240 signed_config_, std::move(details), !ok, client_hello_state_,
1239 std::move(done_cb_)); 1241 std::move(done_cb_));
1240 } 1242 }
1241 1243
1242 private: 1244 private:
1243 const QuicCryptoServerConfig& config_; 1245 const QuicCryptoServerConfig& config_;
1244 const bool found_error_; 1246 const bool found_error_;
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
2274 : channel_id_enabled(false), 2276 : channel_id_enabled(false),
2275 is_primary(false), 2277 is_primary(false),
2276 primary_time(QuicWallTime::Zero()), 2278 primary_time(QuicWallTime::Zero()),
2277 expiry_time(QuicWallTime::Zero()), 2279 expiry_time(QuicWallTime::Zero()),
2278 priority(0), 2280 priority(0),
2279 source_address_token_boxer(nullptr) {} 2281 source_address_token_boxer(nullptr) {}
2280 2282
2281 QuicCryptoServerConfig::Config::~Config() { 2283 QuicCryptoServerConfig::Config::~Config() {
2282 } 2284 }
2283 2285
2284 QuicSignedServerConfig::QuicSignedServerConfig() {} 2286 QuicSignedServerConfig::QuicSignedServerConfig()
2287 : send_expect_ct_header(false) {}
2285 QuicSignedServerConfig::~QuicSignedServerConfig() {} 2288 QuicSignedServerConfig::~QuicSignedServerConfig() {}
2286 2289
2287 } // namespace net 2290 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/crypto/quic_crypto_server_config.h ('k') | net/quic/core/quic_crypto_server_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698