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

Side by Side Diff: net/quic/chromium/crypto/proof_source_chromium.cc

Issue 2679783003: Deprecate FLAGS_quic_reloadable_flag_enable_async_get_proof (Closed)
Patch Set: Address gredner's comments. Created 3 years, 10 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 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/chromium/crypto/proof_source_chromium.h" 5 #include "net/quic/chromium/crypto/proof_source_chromium.h"
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "crypto/openssl_util.h" 8 #include "crypto/openssl_util.h"
9 #include "net/quic/core/crypto/crypto_protocol.h" 9 #include "net/quic/core/crypto/crypto_protocol.h"
10 #include "third_party/boringssl/src/include/openssl/digest.h" 10 #include "third_party/boringssl/src/include/openssl/digest.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 return true; 69 return true;
70 70
71 if (!base::ReadFileToString(sct_path, &signed_certificate_timestamp_)) { 71 if (!base::ReadFileToString(sct_path, &signed_certificate_timestamp_)) {
72 DLOG(FATAL) << "Unable to read signed certificate timestamp."; 72 DLOG(FATAL) << "Unable to read signed certificate timestamp.";
73 return false; 73 return false;
74 } 74 }
75 75
76 return true; 76 return true;
77 } 77 }
78 78
79 bool ProofSourceChromium::GetProof( 79 bool ProofSourceChromium::GetProofInner(
80 const QuicSocketAddress& server_addr, 80 const QuicSocketAddress& server_addr,
81 const string& hostname, 81 const string& hostname,
82 const string& server_config, 82 const string& server_config,
83 QuicVersion quic_version, 83 QuicVersion quic_version,
84 base::StringPiece chlo_hash, 84 base::StringPiece chlo_hash,
85 const QuicTagVector& /* connection_options */, 85 const QuicTagVector& /* connection_options */,
86 QuicReferenceCountedPointer<ProofSource::Chain>* out_chain, 86 QuicReferenceCountedPointer<ProofSource::Chain>* out_chain,
87 QuicCryptoProof* proof) { 87 QuicCryptoProof* proof) {
88 DCHECK(proof != nullptr); 88 DCHECK(proof != nullptr);
89 DCHECK(private_key_.get()) << " this: " << this; 89 DCHECK(private_key_.get()) << " this: " << this;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 QuicVersion quic_version, 139 QuicVersion quic_version,
140 base::StringPiece chlo_hash, 140 base::StringPiece chlo_hash,
141 const QuicTagVector& connection_options, 141 const QuicTagVector& connection_options,
142 std::unique_ptr<Callback> callback) { 142 std::unique_ptr<Callback> callback) {
143 // As a transitional implementation, just call the synchronous version of 143 // As a transitional implementation, just call the synchronous version of
144 // GetProof, then invoke the callback with the results and destroy it. 144 // GetProof, then invoke the callback with the results and destroy it.
145 QuicReferenceCountedPointer<ProofSource::Chain> chain; 145 QuicReferenceCountedPointer<ProofSource::Chain> chain;
146 string signature; 146 string signature;
147 string leaf_cert_sct; 147 string leaf_cert_sct;
148 QuicCryptoProof out_proof; 148 QuicCryptoProof out_proof;
149 const bool ok = GetProof(server_addr, hostname, server_config, quic_version, 149
150 chlo_hash, connection_options, &chain, &out_proof); 150 const bool ok =
151 GetProofInner(server_addr, hostname, server_config, quic_version,
152 chlo_hash, connection_options, &chain, &out_proof);
151 callback->Run(ok, chain, out_proof, nullptr /* details */); 153 callback->Run(ok, chain, out_proof, nullptr /* details */);
152 } 154 }
153 155
154 } // namespace net 156 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/chromium/crypto/proof_source_chromium.h ('k') | net/quic/chromium/crypto/proof_test_chromium.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698