proxygen
|
#include <RecordLayer.h>
Public Member Functions | |
virtual | ~ReadRecordLayer ()=default |
virtual folly::Optional< TLSMessage > | read (folly::IOBufQueue &buf)=0 |
virtual folly::Optional< Param > | readEvent (folly::IOBufQueue &socketBuf) |
virtual bool | hasUnparsedHandshakeData () const |
virtual EncryptionLevel | getEncryptionLevel () const =0 |
Static Public Member Functions | |
static folly::Optional< Param > | decodeHandshakeMessage (folly::IOBufQueue &buf) |
Private Attributes | |
folly::IOBufQueue | unparsedHandshakeData_ |
Definition at line 24 of file RecordLayer.h.
|
virtualdefault |
|
static |
Definition at line 93 of file RecordLayer.cpp.
References fizz::certificate, fizz::certificate_request, fizz::certificate_verify, folly::IOBufQueue::chainLength(), fizz::client_hello, fizz::compressed_certificate, fizz::encrypted_extensions, fizz::end_of_early_data, fizz::finished, folly::IOBufQueue::front(), fizz::key_update, fizz::kMaxHandshakeSize, folly::gen::move, fizz::new_session_ticket, folly::none, fizz::parse< ServerHello >(), fizz::detail::readBits24(), fizz::server_hello, and folly::IOBufQueue::split().
Referenced by fizz::ExportedAuthenticator::getAuthenticatorContext(), readEvent(), and fizz::ExportedAuthenticator::validate().
|
pure virtual |
Returns the current encryption level of the data that the read record layer can process.
Implemented in fizz::EncryptedReadRecordLayer, and fizz::PlaintextReadRecordLayer.
|
virtual |
Check if there is decrypted but unparsed handshake data buffered.
Definition at line 151 of file RecordLayer.cpp.
References folly::IOBufQueue::empty(), and unparsedHandshakeData_.
Referenced by fizz::sm::generateTicket(), fizz::sm::getCertificateRequest(), fizz::sm::getMaxEarlyDataSize(), fizz::sm::handleCertMsg(), and fizz::sm::negotiatePsk().
|
pure virtual |
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.
Implemented in fizz::EncryptedReadRecordLayer, and fizz::PlaintextReadRecordLayer.
Referenced by readEvent().
|
virtual |
Get a message from the record layer. Returns none if insufficient data was available on the socket. Throws on parse error.
Definition at line 18 of file RecordLayer.cpp.
References fizz::alert, fizz::AppData, folly::IOBufQueue::append(), fizz::application_data, folly::apply_visitor(), decodeHandshakeMessage(), folly::IOBufQueue::empty(), fizz::handshake, folly::gen::move, folly::none, read(), fizz::toString(), message::type, and unparsedHandshakeData_.
Referenced by fizz::server::AeadCookieCipher< AeadType, HkdfType >::getTokenOrRetry(), fizz::client::ClientStateMachine::processSocketData(), and fizz::server::ServerStateMachine::processSocketData().
|
private |
Definition at line 55 of file RecordLayer.h.
Referenced by hasUnparsedHandshakeData(), and readEvent().