36 virtual std::unique_ptr<PlaintextReadRecordLayer>
38 return std::make_unique<PlaintextReadRecordLayer>();
41 virtual std::unique_ptr<PlaintextWriteRecordLayer>
43 return std::make_unique<PlaintextWriteRecordLayer>();
46 virtual std::unique_ptr<EncryptedReadRecordLayer>
48 return std::make_unique<EncryptedReadRecordLayer>(encryptionLevel);
51 virtual std::unique_ptr<EncryptedWriteRecordLayer>
53 return std::make_unique<EncryptedWriteRecordLayer>(encryptionLevel);
59 return std::make_unique<KeyScheduler>(
std::move(keyDer));
68 return std::make_unique<KeyDerivationImpl<Sha256>>(
getHkdfPrefix());
70 return std::make_unique<KeyDerivationImpl<Sha384>>(
getHkdfPrefix());
72 throw std::runtime_error(
"ks: not implemented");
82 return std::make_unique<HandshakeContextImpl<Sha256>>(
getHkdfPrefix());
84 return std::make_unique<HandshakeContextImpl<Sha384>>(
getHkdfPrefix());
86 throw std::runtime_error(
"hs: not implemented");
93 return std::make_unique<OpenSSLKeyExchange<P256>>();
95 return std::make_unique<OpenSSLKeyExchange<P384>>();
97 return std::make_unique<OpenSSLKeyExchange<P521>>();
99 return std::make_unique<X25519KeyExchange>();
101 throw std::runtime_error(
"ke: not implemented");
108 return std::make_unique<OpenSSLEVPCipher<ChaCha20Poly1305>>();
110 return std::make_unique<OpenSSLEVPCipher<AESGCM128>>();
112 return std::make_unique<OpenSSLEVPCipher<AESGCM256>>();
114 return std::make_unique<OpenSSLEVPCipher<AESOCB128>>();
116 throw std::runtime_error(
"aead: not implemented");
virtual std::string getHkdfPrefix() const
virtual std::unique_ptr< PlaintextReadRecordLayer > makePlaintextReadRecordLayer() const
constexpr detail::Map< Move > move
virtual ~Factory()=default
virtual std::unique_ptr< KeyScheduler > makeKeyScheduler(CipherSuite cipher) const
virtual std::unique_ptr< KeyExchange > makeKeyExchange(NamedGroup group) const
virtual std::unique_ptr< Aead > makeAead(CipherSuite cipher) const
virtual std::shared_ptr< PeerCert > makePeerCert(Buf certData) const
virtual std::unique_ptr< EncryptedReadRecordLayer > makeEncryptedReadRecordLayer(EncryptionLevel encryptionLevel) const
virtual std::unique_ptr< HandshakeContext > makeHandshakeContext(CipherSuite cipher) const
std::array< uint8_t, 32 > Random
static std::unique_ptr< PeerCert > makePeerCert(Buf certData)
Optional< NamedGroup > group
virtual std::unique_ptr< EncryptedWriteRecordLayer > makeEncryptedWriteRecordLayer(EncryptionLevel encryptionLevel) const
virtual uint32_t makeTicketAgeAdd() const
std::unique_ptr< folly::IOBuf > Buf
virtual Random makeRandom() const
constexpr folly::StringPiece kHkdfLabelPrefix
virtual std::unique_ptr< KeyDerivation > makeKeyDeriver(CipherSuite cipher) const
virtual std::unique_ptr< PlaintextWriteRecordLayer > makePlaintextWriteRecordLayer() const