| OLD | NEW |
| 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/crypto/null_encrypter.h" | 9 #include "net/quic/crypto/null_encrypter.h" |
| 10 #include "net/quic/quic_client_session_base.h" | 10 #include "net/quic/quic_client_session_base.h" |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 session()->connection()->SetAlternativeDecrypter( | 459 session()->connection()->SetAlternativeDecrypter( |
| 460 crypters->decrypter.release(), ENCRYPTION_FORWARD_SECURE, | 460 crypters->decrypter.release(), ENCRYPTION_FORWARD_SECURE, |
| 461 false /* don't latch */); | 461 false /* don't latch */); |
| 462 session()->connection()->SetEncrypter( | 462 session()->connection()->SetEncrypter( |
| 463 ENCRYPTION_FORWARD_SECURE, crypters->encrypter.release()); | 463 ENCRYPTION_FORWARD_SECURE, crypters->encrypter.release()); |
| 464 session()->connection()->SetDefaultEncryptionLevel( | 464 session()->connection()->SetDefaultEncryptionLevel( |
| 465 ENCRYPTION_FORWARD_SECURE); | 465 ENCRYPTION_FORWARD_SECURE); |
| 466 | 466 |
| 467 handshake_confirmed_ = true; | 467 handshake_confirmed_ = true; |
| 468 session()->OnCryptoHandshakeEvent(QuicSession::HANDSHAKE_CONFIRMED); | 468 session()->OnCryptoHandshakeEvent(QuicSession::HANDSHAKE_CONFIRMED); |
| 469 session()->connection()->OnHandshakeComplete(); |
| 469 return; | 470 return; |
| 470 } | 471 } |
| 471 case STATE_IDLE: | 472 case STATE_IDLE: |
| 472 // This means that the peer sent us a message that we weren't expecting. | 473 // This means that the peer sent us a message that we weren't expecting. |
| 473 CloseConnection(QUIC_INVALID_CRYPTO_MESSAGE_TYPE); | 474 CloseConnection(QUIC_INVALID_CRYPTO_MESSAGE_TYPE); |
| 474 return; | 475 return; |
| 475 } | 476 } |
| 476 } | 477 } |
| 477 } | 478 } |
| 478 | 479 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 505 } | 506 } |
| 506 } | 507 } |
| 507 return false; | 508 return false; |
| 508 } | 509 } |
| 509 | 510 |
| 510 QuicClientSessionBase* QuicCryptoClientStream::client_session() { | 511 QuicClientSessionBase* QuicCryptoClientStream::client_session() { |
| 511 return reinterpret_cast<QuicClientSessionBase*>(session()); | 512 return reinterpret_cast<QuicClientSessionBase*>(session()); |
| 512 } | 513 } |
| 513 | 514 |
| 514 } // namespace net | 515 } // namespace net |
| OLD | NEW |