proxygen
PlaintextRecordLayer.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-present, Facebook, Inc.
3  * All rights reserved.
4  *
5  * This source code is licensed under the BSD-style license found in the
6  * LICENSE file in the root directory of this source tree.
7  */
8 
9 #pragma once
10 
12 
13 namespace fizz {
14 
16  public:
17  ~PlaintextReadRecordLayer() override = default;
18 
22  virtual void setSkipEncryptedRecords(bool enabled) {
23  skipEncryptedRecords_ = enabled;
24  }
25 
27 
34  }
35 
36  EncryptionLevel getEncryptionLevel() const override;
37 
38  private:
39  bool skipEncryptedRecords_{false};
40 
42 };
43 
45  public:
46  ~PlaintextWriteRecordLayer() override = default;
47 
48  TLSContent write(TLSMessage&& msg) const override;
49 
55  virtual TLSContent writeInitialClientHello(Buf encodedClientHello) const;
56 
57  EncryptionLevel getEncryptionLevel() const override;
58 
59  private:
60  TLSContent write(TLSMessage msg, ProtocolVersion recordVersion) const;
61 };
62 } // namespace fizz
folly::Optional< TLSMessage > read(folly::IOBufQueue &buf) override
void write(const T &in, folly::io::Appender &appender)
Definition: Types-inl.h:112
virtual void setSkipEncryptedRecords(bool enabled)
ProtocolVersion
Definition: Types.h:24
~PlaintextReadRecordLayer() override=default
EncryptionLevel
Definition: Types.h:29
EncryptionLevel getEncryptionLevel() const override
Definition: Actions.h:16
folly::Optional< ProtocolVersion > receivedRecordVersion_
std::unique_ptr< folly::IOBuf > Buf
Definition: Types.h:22
folly::Optional< ProtocolVersion > getReceivedRecordVersion() const