proxygen
|
#include <EncryptedRecordLayer.h>
Public Member Functions | |
~EncryptedWriteRecordLayer () override=default | |
EncryptedWriteRecordLayer (EncryptionLevel encryptionLevel) | |
TLSContent | write (TLSMessage &&msg) const override |
virtual void | setAead (folly::ByteRange, std::unique_ptr< Aead > aead) |
void | setMaxRecord (uint16_t size) |
void | setMinDesiredRecord (uint16_t size) |
EncryptionLevel | getEncryptionLevel () const override |
Public Member Functions inherited from fizz::WriteRecordLayer | |
virtual | ~WriteRecordLayer ()=default |
TLSContent | writeAlert (Alert &&alert) const |
TLSContent | writeAppData (std::unique_ptr< folly::IOBuf > &&appData) const |
template<typename... Args> | |
TLSContent | writeHandshake (Buf &&encodedHandshakeMsg, Args &&...args) const |
void | setProtocolVersion (ProtocolVersion version) const |
Private Member Functions | |
Buf | getBufToEncrypt (folly::IOBufQueue &queue) const |
Private Attributes | |
std::unique_ptr< Aead > | aead_ |
uint16_t | maxRecord_ {kMaxPlaintextRecordSize} |
uint16_t | desiredMinRecord_ {kMinSuggestedRecordSize} |
uint64_t | seqNum_ {0} |
EncryptionLevel | encryptionLevel_ |
Additional Inherited Members | |
Protected Attributes inherited from fizz::WriteRecordLayer | |
ProtocolVersion | recordVersion_ {ProtocolVersion::tls_1_2} |
bool | useAdditionalData_ {true} |
Definition at line 67 of file EncryptedRecordLayer.h.
|
overridedefault |
|
explicit |
Definition at line 143 of file EncryptedRecordLayer.cpp.
|
private |
Definition at line 222 of file EncryptedRecordLayer.cpp.
References desiredMinRecord_, folly::IOBufQueue::front(), folly::IOBuf::length(), maxRecord_, folly::IOBufQueue::pop_front(), and folly::IOBufQueue::splitAtMost().
Referenced by write().
|
overridevirtual |
Returns the current encryption level of the data that the write record layer writes at.
Implements fizz::WriteRecordLayer.
Definition at line 232 of file EncryptedRecordLayer.cpp.
References encryptionLevel_.
|
inlinevirtual |
Reimplemented in fizz::MockEncryptedWriteRecordLayer.
Definition at line 75 of file EncryptedRecordLayer.h.
References fizz::EncryptedReadRecordLayer::aead_, folly::gen::move, and fizz::EncryptedReadRecordLayer::seqNum_.
|
inline |
Definition at line 84 of file EncryptedRecordLayer.h.
References folly::size().
|
inline |
Definition at line 90 of file EncryptedRecordLayer.h.
References fizz::EncryptedReadRecordLayer::getEncryptionLevel(), and folly::size().
|
overridevirtual |
Implements fizz::WriteRecordLayer.
Reimplemented in fizz::MockEncryptedWriteRecordLayer.
Definition at line 147 of file EncryptedRecordLayer.cpp.
References aead_, folly::IOBufQueue::append(), fizz::application_data, fizz::TLSContent::contentType, folly::IOBuf::copyBuffer(), folly::IOBuf::create(), fizz::TLSContent::data, folly::IOBufQueue::empty(), fizz::TLSContent::encryptionLevel, encryptionLevel_, getBufToEncrypt(), fizz::kEncryptedHeaderSize, max, folly::gen::move, folly::IOBuf::prependChain(), folly::range(), fizz::WriteRecordLayer::recordVersion_, seqNum_, uint16_t, fizz::WriteRecordLayer::useAdditionalData_, folly::IOBuf::wrapBufferAsValue(), and folly::io::detail::Writable< Derived >::writeBE().
|
private |
Definition at line 101 of file EncryptedRecordLayer.h.
Referenced by write().
|
private |
Definition at line 104 of file EncryptedRecordLayer.h.
Referenced by getBufToEncrypt().
|
private |
Definition at line 107 of file EncryptedRecordLayer.h.
Referenced by getEncryptionLevel(), and write().
|
private |
Definition at line 103 of file EncryptedRecordLayer.h.
Referenced by getBufToEncrypt().
|
mutableprivate |
Definition at line 106 of file EncryptedRecordLayer.h.
Referenced by write().