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

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

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
« no previous file with comments | « net/quic/quic_crypto_client_stream.h ('k') | net/quic/test_tools/quic_test_utils.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 #include "net/quic/quic_crypto_client_stream.h" 5 #include "net/quic/quic_crypto_client_stream.h"
6 6
7 #include "net/quic/crypto/crypto_protocol.h" 7 #include "net/quic/crypto/crypto_protocol.h"
8 #include "net/quic/crypto/crypto_utils.h" 8 #include "net/quic/crypto/crypto_utils.h"
9 #include "net/quic/quic_protocol.h" 9 #include "net/quic/quic_protocol.h"
10 #include "net/quic/quic_session.h" 10 #include "net/quic/quic_session.h"
(...skipping 19 matching lines...) Expand all
30 CloseConnection(QUIC_INVALID_CRYPTO_MESSAGE_TYPE); 30 CloseConnection(QUIC_INVALID_CRYPTO_MESSAGE_TYPE);
31 return; 31 return;
32 } 32 }
33 33
34 // TODO(rch): correctly validate the message 34 // TODO(rch): correctly validate the message
35 SetHandshakeComplete(QUIC_NO_ERROR); 35 SetHandshakeComplete(QUIC_NO_ERROR);
36 return; 36 return;
37 } 37 }
38 38
39 bool QuicCryptoClientStream::CryptoConnect() { 39 bool QuicCryptoClientStream::CryptoConnect() {
40 crypto_config_.SetClientDefaults(); 40 crypto_config_.SetDefaults();
41 CryptoUtils::GenerateNonce(session()->connection()->clock(), 41 CryptoUtils::GenerateNonce(session()->connection()->clock(),
42 session()->connection()->random_generator(), 42 session()->connection()->random_generator(),
43 &nonce_); 43 &nonce_);
44 CryptoHandshakeMessage message; 44 CryptoHandshakeMessage message;
45 CryptoUtils::FillClientHelloMessage(crypto_config_, nonce_, 45 crypto_config_.FillClientHello(nonce_, server_hostname_, &message);
46 server_hostname_, &message);
47 SendHandshakeMessage(message); 46 SendHandshakeMessage(message);
48 return true; 47 return true;
49 } 48 }
50 49
51 } // namespace net 50 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_crypto_client_stream.h ('k') | net/quic/test_tools/quic_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698