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

Side by Side Diff: net/quic/crypto/crypto_handshake.h

Issue 15074007: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix for windows Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/crypto/common_cert_set_test.cc ('k') | net/quic/crypto/crypto_handshake.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_H_ 5 #ifndef NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_H_
6 #define NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_H_ 6 #define NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/strings/string_piece.h" 13 #include "base/strings/string_piece.h"
14 #include "net/base/net_export.h" 14 #include "net/base/net_export.h"
15 #include "net/quic/crypto/crypto_protocol.h" 15 #include "net/quic/crypto/crypto_protocol.h"
16 #include "net/quic/quic_protocol.h" 16 #include "net/quic/quic_protocol.h"
17 #include "net/quic/quic_time.h"
18 17
19 namespace net { 18 namespace net {
20 19
21 class CommonCertSets; 20 class CommonCertSets;
22 class KeyExchange; 21 class KeyExchange;
23 class ProofVerifier; 22 class ProofVerifier;
24 class QuicDecrypter; 23 class QuicDecrypter;
25 class QuicEncrypter; 24 class QuicEncrypter;
26 class QuicRandom; 25 class QuicRandom;
27 26
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 ~QuicCryptoConfig(); 180 ~QuicCryptoConfig();
182 181
183 // Protocol version 182 // Protocol version
184 uint16 version; 183 uint16 version;
185 // Key exchange methods. The following two members' values correspond by 184 // Key exchange methods. The following two members' values correspond by
186 // index. 185 // index.
187 QuicTagVector kexs; 186 QuicTagVector kexs;
188 // Authenticated encryption with associated data (AEAD) algorithms. 187 // Authenticated encryption with associated data (AEAD) algorithms.
189 QuicTagVector aead; 188 QuicTagVector aead;
190 189
191 scoped_ptr<CommonCertSets> common_cert_set_; 190 scoped_ptr<CommonCertSets> common_cert_sets;
192 191
193 private: 192 private:
194 DISALLOW_COPY_AND_ASSIGN(QuicCryptoConfig); 193 DISALLOW_COPY_AND_ASSIGN(QuicCryptoConfig);
195 }; 194 };
196 195
197 // QuicCryptoClientConfig contains crypto-related configuration settings for a 196 // QuicCryptoClientConfig contains crypto-related configuration settings for a
198 // client. Note that this object isn't thread-safe. It's designed to be used on 197 // client. Note that this object isn't thread-safe. It's designed to be used on
199 // a single thread at a time. 198 // a single thread at a time.
200 class NET_EXPORT_PRIVATE QuicCryptoClientConfig : public QuicCryptoConfig { 199 class NET_EXPORT_PRIVATE QuicCryptoClientConfig : public QuicCryptoConfig {
201 public: 200 public:
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 // |server_hello| is unacceptable then it puts an error message in 303 // |server_hello| is unacceptable then it puts an error message in
305 // |error_details| and returns an error code. 304 // |error_details| and returns an error code.
306 QuicErrorCode ProcessServerHello(const CryptoHandshakeMessage& server_hello, 305 QuicErrorCode ProcessServerHello(const CryptoHandshakeMessage& server_hello,
307 QuicGuid guid, 306 QuicGuid guid,
308 QuicCryptoNegotiatedParameters* out_params, 307 QuicCryptoNegotiatedParameters* out_params,
309 std::string* error_details); 308 std::string* error_details);
310 309
311 const ProofVerifier* proof_verifier() const; 310 const ProofVerifier* proof_verifier() const;
312 311
313 // SetProofVerifier takes ownership of a |ProofVerifier| that clients are 312 // SetProofVerifier takes ownership of a |ProofVerifier| that clients are
314 // free to use in order to verify certificate chains from servers. Setting a 313 // free to use in order to verify certificate chains from servers. If a
315 // |ProofVerifier| does not alter the behaviour of the 314 // ProofVerifier is set then the client will request a certificate chain from
316 // QuicCryptoClientConfig, it's just a place to store it. 315 // the server.
317 void SetProofVerifier(ProofVerifier* verifier); 316 void SetProofVerifier(ProofVerifier* verifier);
318 317
319 private: 318 private:
320 // cached_states_ maps from the server hostname to the cached information 319 // cached_states_ maps from the server hostname to the cached information
321 // about that server. 320 // about that server.
322 std::map<std::string, CachedState*> cached_states_; 321 std::map<std::string, CachedState*> cached_states_;
323 322
324 scoped_ptr<ProofVerifier> proof_verifier_; 323 scoped_ptr<ProofVerifier> proof_verifier_;
325 324
326 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientConfig); 325 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientConfig);
327 }; 326 };
328 327
329 } // namespace net 328 } // namespace net
330 329
331 #endif // NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_H_ 330 #endif // NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_H_
OLDNEW
« no previous file with comments | « net/quic/crypto/common_cert_set_test.cc ('k') | net/quic/crypto/crypto_handshake.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698