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

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

Issue 12381018: QUIC - Some sketching of the crypto handshake. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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 | Annotate | Revision Log
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_CLIENT_STREAM_H_ 5 #ifndef NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_
6 #define NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ 6 #define NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "net/quic/crypto/crypto_handshake.h"
wtc 2013/03/01 19:07:58 The internal CL lists this header in the wrong ord
ramant (doing other things) 2013/03/01 22:02:04 Will do asap.
10 #include "net/quic/quic_crypto_stream.h" 11 #include "net/quic/quic_crypto_stream.h"
11 12
12 namespace net { 13 namespace net {
13 14
14 class QuicSession; 15 class QuicSession;
15 struct CryptoHandshakeMessage; 16 struct CryptoHandshakeMessage;
16 17
17 class NET_EXPORT_PRIVATE QuicCryptoClientStream : public QuicCryptoStream { 18 class NET_EXPORT_PRIVATE QuicCryptoClientStream : public QuicCryptoStream {
18 19
19 public: 20 public:
20 QuicCryptoClientStream(QuicSession* session, const string& server_hostname); 21 QuicCryptoClientStream(QuicSession* session, const string& server_hostname);
21 22
22 // CryptoFramerVisitorInterface implementation 23 // CryptoFramerVisitorInterface implementation
23 virtual void OnHandshakeMessage( 24 virtual void OnHandshakeMessage(
24 const CryptoHandshakeMessage& message) OVERRIDE; 25 const CryptoHandshakeMessage& message) OVERRIDE;
25 26
26 // Performs a crypto handshake with the server. Returns true if the crypto 27 // Performs a crypto handshake with the server. Returns true if the crypto
27 // handshake is started successfully. 28 // handshake is started successfully.
28 bool CryptoConnect(); 29 bool CryptoConnect();
29 30
30 private: 31 private:
31 QuicCryptoConfig crypto_config_; 32 QuicCryptoClientConfig crypto_config_;
32 // Client's connection nonce (4-byte timestamp + 28 random bytes) 33 // Client's connection nonce (4-byte timestamp + 28 random bytes)
33 std::string nonce_; 34 std::string nonce_;
34 // Server's hostname 35 // Server's hostname
35 std::string server_hostname_; 36 std::string server_hostname_;
36 37
37 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientStream); 38 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientStream);
38 }; 39 };
39 40
40 } // namespace net 41 } // namespace net
41 42
42 #endif // NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ 43 #endif // NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698