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

Side by Side Diff: net/quic/quic_crypto_server_stream.h

Issue 1782743005: Add QuicCompressedCertsCache* to QuicCrytoServerStream plumbed from QuicServerSessionBase. No behav… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@116387934
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | net/quic/quic_crypto_server_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef NET_QUIC_QUIC_CRYPTO_SERVER_STREAM_H_ 5 #ifndef NET_QUIC_QUIC_CRYPTO_SERVER_STREAM_H_
6 #define NET_QUIC_QUIC_CRYPTO_SERVER_STREAM_H_ 6 #define NET_QUIC_QUIC_CRYPTO_SERVER_STREAM_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "net/quic/crypto/crypto_handshake.h" 13 #include "net/quic/crypto/crypto_handshake.h"
14 #include "net/quic/crypto/quic_compressed_certs_cache.h"
14 #include "net/quic/crypto/quic_crypto_server_config.h" 15 #include "net/quic/crypto/quic_crypto_server_config.h"
15 #include "net/quic/proto/source_address_token.pb.h" 16 #include "net/quic/proto/source_address_token.pb.h"
16 #include "net/quic/quic_config.h" 17 #include "net/quic/quic_config.h"
17 #include "net/quic/quic_crypto_stream.h" 18 #include "net/quic/quic_crypto_stream.h"
18 19
19 namespace net { 20 namespace net {
20 21
21 class CachedNetworkParameters; 22 class CachedNetworkParameters;
22 class CryptoHandshakeMessage; 23 class CryptoHandshakeMessage;
23 class QuicCryptoServerConfig; 24 class QuicCryptoServerConfig;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 const = 0; 86 const = 0;
86 virtual void SetPreviousCachedNetworkParams( 87 virtual void SetPreviousCachedNetworkParams(
87 CachedNetworkParameters cached_network_params) = 0; 88 CachedNetworkParameters cached_network_params) = 0;
88 }; 89 };
89 90
90 class NET_EXPORT_PRIVATE QuicCryptoServerStream 91 class NET_EXPORT_PRIVATE QuicCryptoServerStream
91 : public QuicCryptoServerStreamBase { 92 : public QuicCryptoServerStreamBase {
92 public: 93 public:
93 // |crypto_config| must outlive the stream. 94 // |crypto_config| must outlive the stream.
94 QuicCryptoServerStream(const QuicCryptoServerConfig* crypto_config, 95 QuicCryptoServerStream(const QuicCryptoServerConfig* crypto_config,
96 QuicCompressedCertsCache* compressed_certs_cache,
95 bool use_stateless_rejects_if_peer_supported, 97 bool use_stateless_rejects_if_peer_supported,
96 QuicSession* session); 98 QuicSession* session);
97 ~QuicCryptoServerStream() override; 99 ~QuicCryptoServerStream() override;
98 100
99 // From QuicCryptoServerStreamBase 101 // From QuicCryptoServerStreamBase
100 void CancelOutstandingCallbacks() override; 102 void CancelOutstandingCallbacks() override;
101 void OnHandshakeMessage(const CryptoHandshakeMessage& message) override; 103 void OnHandshakeMessage(const CryptoHandshakeMessage& message) override;
102 bool GetBase64SHA256ClientChannelID(std::string* output) const override; 104 bool GetBase64SHA256ClientChannelID(std::string* output) const override;
103 void SendServerConfigUpdate( 105 void SendServerConfigUpdate(
104 const CachedNetworkParameters* cached_network_params) override; 106 const CachedNetworkParameters* cached_network_params) override;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 const ValidateClientHelloResultCallback::Result& result); 160 const ValidateClientHelloResultCallback::Result& result);
159 161
160 // Checks the options on the handshake-message to see whether the 162 // Checks the options on the handshake-message to see whether the
161 // peer supports stateless-rejects. 163 // peer supports stateless-rejects.
162 static bool DoesPeerSupportStatelessRejects( 164 static bool DoesPeerSupportStatelessRejects(
163 const CryptoHandshakeMessage& message); 165 const CryptoHandshakeMessage& message);
164 166
165 // crypto_config_ contains crypto parameters for the handshake. 167 // crypto_config_ contains crypto parameters for the handshake.
166 const QuicCryptoServerConfig* crypto_config_; 168 const QuicCryptoServerConfig* crypto_config_;
167 169
170 // compressed_certs_cache_ contains a set of most recently compressed certs.
171 // Owned by QuicDispatcher.
172 QuicCompressedCertsCache* compressed_certs_cache_;
173
168 // Server's certificate chain and signature of the server config, as provided 174 // Server's certificate chain and signature of the server config, as provided
169 // by ProofSource::GetProof. 175 // by ProofSource::GetProof.
170 QuicCryptoProof crypto_proof_; 176 QuicCryptoProof crypto_proof_;
171 177
172 // Pointer to the active callback that will receive the result of 178 // Pointer to the active callback that will receive the result of
173 // the client hello validation request and forward it to 179 // the client hello validation request and forward it to
174 // FinishProcessingHandshakeMessage for processing. nullptr if no 180 // FinishProcessingHandshakeMessage for processing. nullptr if no
175 // handshake message is being validated. 181 // handshake message is being validated.
176 ValidateCallback* validate_client_hello_cb_; 182 ValidateCallback* validate_client_hello_cb_;
177 183
(...skipping 26 matching lines...) Expand all
204 // TODO(jokulik): Remove once client stateless reject support 210 // TODO(jokulik): Remove once client stateless reject support
205 // becomes the default. 211 // becomes the default.
206 bool peer_supports_stateless_rejects_; 212 bool peer_supports_stateless_rejects_;
207 213
208 DISALLOW_COPY_AND_ASSIGN(QuicCryptoServerStream); 214 DISALLOW_COPY_AND_ASSIGN(QuicCryptoServerStream);
209 }; 215 };
210 216
211 } // namespace net 217 } // namespace net
212 218
213 #endif // NET_QUIC_QUIC_CRYPTO_SERVER_STREAM_H_ 219 #endif // NET_QUIC_QUIC_CRYPTO_SERVER_STREAM_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_crypto_server_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698