30 std::unique_ptr<Aead> aead) {
32 throw std::runtime_error(
"aead set after read");
77 std::unique_ptr<Aead> aead) {
79 throw std::runtime_error(
"aead set after write");
86 DCHECK_LE(size, kMaxPlaintextRecordSize);
92 DCHECK_LE(size, kMaxPlaintextRecordSize);
93 desiredMinRecord_ =
size;
104 uint16_t desiredMinRecord_{kMinSuggestedRecordSize};
void setMaxRecord(uint16_t size)
EncryptedReadRecordLayer(EncryptionLevel encryptionLevel)
void write(const T &in, folly::io::Appender &appender)
std::unique_ptr< Aead > aead_
void setMinDesiredRecord(uint16_t size)
folly::Optional< Buf > getDecryptedBuf(folly::IOBufQueue &buf)
~EncryptedReadRecordLayer() override=default
constexpr detail::Map< Move > move
bool skipFailedDecryption_
virtual void setSkipFailedDecryption(bool enabled)
constexpr auto size(C const &c) -> decltype(c.size())
virtual void setAead(folly::ByteRange, std::unique_ptr< Aead > aead)
constexpr uint16_t kMaxPlaintextRecordSize
EncryptionLevel getEncryptionLevel() const override
EncryptionLevel encryptionLevel_
std::unique_ptr< folly::IOBuf > Buf
ProtocolVersion getRealDraftVersion(ProtocolVersion version)
void setProtocolVersion(ProtocolVersion version)
folly::Optional< TLSMessage > read(folly::IOBufQueue &buf) override
EncryptionLevel encryptionLevel_
std::unique_ptr< Aead > aead_
constexpr uint16_t kMinSuggestedRecordSize
virtual void setAead(folly::ByteRange, std::unique_ptr< Aead > aead)