proxygen
|
#include <PlaintextRecordLayer.h>
Public Member Functions | |
~PlaintextReadRecordLayer () override=default | |
virtual void | setSkipEncryptedRecords (bool enabled) |
folly::Optional< TLSMessage > | read (folly::IOBufQueue &buf) override |
folly::Optional< ProtocolVersion > | getReceivedRecordVersion () const |
EncryptionLevel | getEncryptionLevel () const override |
Public Member Functions inherited from fizz::ReadRecordLayer | |
virtual | ~ReadRecordLayer ()=default |
virtual folly::Optional< Param > | readEvent (folly::IOBufQueue &socketBuf) |
virtual bool | hasUnparsedHandshakeData () const |
Private Attributes | |
bool | skipEncryptedRecords_ {false} |
folly::Optional< ProtocolVersion > | receivedRecordVersion_ |
Additional Inherited Members | |
Static Public Member Functions inherited from fizz::ReadRecordLayer | |
static folly::Optional< Param > | decodeHandshakeMessage (folly::IOBufQueue &buf) |
Definition at line 15 of file PlaintextRecordLayer.h.
|
overridedefault |
|
overridevirtual |
Returns the current encryption level of the data that the read record layer can process.
Implements fizz::ReadRecordLayer.
Definition at line 97 of file PlaintextRecordLayer.cpp.
References fizz::Plaintext.
Referenced by getReceivedRecordVersion().
|
inline |
Get the record protocol version of the most recent received record. Should only be used for logging.
Definition at line 32 of file PlaintextRecordLayer.h.
References getEncryptionLevel(), and receivedRecordVersion_.
|
overridevirtual |
Reads a fragment from the record layer. Returns an empty optional if insuficient data available. Throws if data malformed. On success, advances buf the amount read.
Implements fizz::ReadRecordLayer.
Definition at line 23 of file PlaintextRecordLayer.cpp.
References fizz::alert, fizz::application_data, folly::IOBufQueue::chainLength(), fizz::change_cipher_spec, folly::IOBufQueue::empty(), fizz::TLSMessage::fragment, folly::IOBufQueue::front(), fizz::handshake, folly::hexlify(), fizz::illegal_parameter, folly::gen::move, folly::none, receivedRecordVersion_, skipEncryptedRecords_, folly::IOBufQueue::splitAtMost(), folly::IOBufQueue::trimStart(), fizz::TLSMessage::type, and uint16_t.
Referenced by setSkipEncryptedRecords().
|
inlinevirtual |
Skip over received encrypted records until a plaintext record is received.
Definition at line 22 of file PlaintextRecordLayer.h.
References read(), and skipEncryptedRecords_.
|
private |
Definition at line 41 of file PlaintextRecordLayer.h.
Referenced by getReceivedRecordVersion(), and read().
|
private |
Definition at line 39 of file PlaintextRecordLayer.h.
Referenced by read(), and setSkipEncryptedRecords().