12 template <CertificateStorage Storage>
15 template <CertificateStorage Storage>
22 uint64_t ticketIssueTime = std::chrono::duration_cast<std::chrono::seconds>(
32 fizz::detail::writeBuf<uint16_t>(selfIdentity, appender);
38 fizz::detail::writeBuf<uint8_t>(alpnBuf, appender);
40 fizz::detail::writeBuf<uint8_t>(
nullptr, appender);
42 fizz::detail::writeBuf<uint16_t>(resState.
appToken, appender);
46 template <CertificateStorage Storage>
55 fizz::detail::readBuf<uint16_t>(resState.resumptionSecret, cursor);
57 fizz::detail::readBuf<uint16_t>(selfIdentity, cursor);
65 fizz::detail::readBuf<uint8_t>(alpnBuf, cursor);
66 if (!alpnBuf->empty()) {
67 resState.alpn = alpnBuf->moveToFbString().toStdString();
70 resState.ticketIssueTime = std::chrono::time_point<std::chrono::system_clock>(
71 std::chrono::seconds(seconds));
74 context->
getCert(selfIdentity->moveToFbString().toStdString());
76 if (cursor.isAtEnd()) {
79 fizz::detail::readBuf<uint16_t>(resState.appToken, cursor);
folly::Optional< std::pair< std::shared_ptr< SelfCert >, SignatureScheme > > getCert(const folly::Optional< std::string > &sni, const std::vector< SignatureScheme > &peerSigSchemes) const
void write(const T &in, folly::io::Appender &appender)
static std::unique_ptr< IOBuf > create(std::size_t capacity)
static ResumptionState decode(Buf encoded, const FizzServerContext *context)
folly::Optional< std::string > alpn
std::chrono::system_clock::time_point ticketIssueTime
std::shared_ptr< const Cert > readClientCertificate(folly::io::Cursor &cursor)
size_t read(T &out, folly::io::Cursor &cursor)
static constexpr folly::StringPiece Label
std::unique_ptr< folly::IOBuf > Buf
void appendClientCertificate(CertificateStorage storage, const std::shared_ptr< const Cert > &cert, folly::io::Appender &appender)
std::shared_ptr< const Cert > serverCert
static std::unique_ptr< IOBuf > copyBuffer(const void *buf, std::size_t size, std::size_t headroom=0, std::size_t minTailroom=0)
std::shared_ptr< const Cert > clientCert
static Buf encode(ResumptionState state)