12 template <
typename ActionMoveVisitor,
typename SM>
15 std::shared_ptr<const FizzServerContext>
context,
16 std::shared_ptr<ServerExtensions> extensions) {
17 checkV2Hello_ = context->getVersionFallbackEnabled();
18 this->addProcessingActions(this->machine_.processAccept(
22 template <
typename ActionMoveVisitor,
typename SM>
29 if (!this->actionProcessing() &&
31 VLOG(3) <<
"Attempting fallback due to V2 ClientHello";
33 fallback.
clientHello = this->transportReadBuf_.move();
38 checkV2Hello_ =
false;
45 template <
typename ActionMoveVisitor,
typename SM>
50 if (!this->state_.earlyExporterMasterSecret()) {
51 throw std::runtime_error(
"early ekm not available");
54 *this->state_.cipher(),
55 (*this->state_.earlyExporterMasterSecret())->coalesce(),
57 context ? context->clone() :
nullptr,
61 template <
typename ActionMoveVisitor,
typename SM>
74 [
this](
Actions& immediateActions) {
75 this->processActions(
std::move(immediateActions));
Actions actions(Args &&...act)
void processActions(typename StateMachine::CompletedActions actions)
constexpr detail::Map< Move > move
boost::variant< Actions, folly::Future< Actions >> AsyncActions
void startActions(AsyncActions actions)
bool looksLikeV2ClientHello(const folly::IOBufQueue &queue)
void accept(folly::Executor *executor, std::shared_ptr< const FizzServerContext > context, std::shared_ptr< ServerExtensions > extensions=nullptr)
PUSHMI_INLINE_VAR constexpr __adl::get_executor_fn executor
Actions actions(Args &&...act)
static Buf getEkm(CipherSuite cipher, folly::ByteRange exporterMaster, folly::StringPiece label, Buf context, uint16_t length)
std::unique_ptr< folly::IOBuf > Buf
decltype(auto) variant_match(Variant &&variant, Cases &&...cases)
Buf getEarlyEkm(folly::StringPiece label, const Buf &context, uint16_t length) const
std::unique_ptr< folly::IOBuf > clientHello