| 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 #ifndef NET_QUIC_QUIC_CRYPTO_STREAM_H_ | 5 #ifndef NET_QUIC_QUIC_CRYPTO_STREAM_H_ |
| 6 #define NET_QUIC_QUIC_CRYPTO_STREAM_H_ | 6 #define NET_QUIC_QUIC_CRYPTO_STREAM_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "net/quic/crypto/crypto_framer.h" | 9 #include "net/quic/crypto/crypto_framer.h" |
| 10 #include "net/quic/crypto/crypto_utils.h" | 10 #include "net/quic/crypto/crypto_utils.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 virtual void OnHandshakeMessage( | 38 virtual void OnHandshakeMessage( |
| 39 const CryptoHandshakeMessage& message) OVERRIDE; | 39 const CryptoHandshakeMessage& message) OVERRIDE; |
| 40 | 40 |
| 41 // ReliableQuicStream implementation | 41 // ReliableQuicStream implementation |
| 42 virtual uint32 ProcessRawData(const char* data, uint32 data_len) OVERRIDE; | 42 virtual uint32 ProcessRawData(const char* data, uint32 data_len) OVERRIDE; |
| 43 virtual QuicPriority EffectivePriority() const OVERRIDE; | 43 virtual QuicPriority EffectivePriority() const OVERRIDE; |
| 44 | 44 |
| 45 // Sends |message| to the peer. | 45 // Sends |message| to the peer. |
| 46 // TODO(wtc): return a success/failure status. | 46 // TODO(wtc): return a success/failure status. |
| 47 void SendHandshakeMessage(const CryptoHandshakeMessage& message); | 47 void SendHandshakeMessage(const CryptoHandshakeMessage& message); |
| 48 // As above, but registers |delegate| for notification when |message| has been |
| 49 // ACKed by the peer. |
| 50 void SendHandshakeMessage(const CryptoHandshakeMessage& message, |
| 51 QuicAckNotifier::DelegateInterface* delegate); |
| 48 | 52 |
| 49 // Performs key extraction to derive a new secret of |result_len| bytes | 53 // Performs key extraction to derive a new secret of |result_len| bytes |
| 50 // dependent on |label|, |context|, and the stream's negotiated subkey secret. | 54 // dependent on |label|, |context|, and the stream's negotiated subkey secret. |
| 51 // Returns false if the handshake has not been confirmed or the parameters are | 55 // Returns false if the handshake has not been confirmed or the parameters are |
| 52 // invalid (e.g. |label| contains null bytes); returns true on success. | 56 // invalid (e.g. |label| contains null bytes); returns true on success. |
| 53 bool ExportKeyingMaterial(base::StringPiece label, | 57 bool ExportKeyingMaterial(base::StringPiece label, |
| 54 base::StringPiece context, | 58 base::StringPiece context, |
| 55 size_t result_len, | 59 size_t result_len, |
| 56 std::string* result) const; | 60 std::string* result) const; |
| 57 | 61 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 70 CryptoFramer crypto_framer_; | 74 CryptoFramer crypto_framer_; |
| 71 | 75 |
| 72 bool is_server_; | 76 bool is_server_; |
| 73 | 77 |
| 74 DISALLOW_COPY_AND_ASSIGN(QuicCryptoStream); | 78 DISALLOW_COPY_AND_ASSIGN(QuicCryptoStream); |
| 75 }; | 79 }; |
| 76 | 80 |
| 77 } // namespace net | 81 } // namespace net |
| 78 | 82 |
| 79 #endif // NET_QUIC_QUIC_CRYPTO_STREAM_H_ | 83 #endif // NET_QUIC_QUIC_CRYPTO_STREAM_H_ |
| OLD | NEW |