11 #include <gmock/gmock.h> 40 std::shared_ptr<const FizzServerContext>
context,
41 const std::shared_ptr<ServerExtensions>& extensions));
45 std::shared_ptr<const FizzServerContext> context,
46 const std::shared_ptr<ServerExtensions>& extensions)
override {
47 return *_processAccept(state, executor,
std::move(context), extensions);
55 return *_processSocketData(state, queue);
59 _processWriteNewSessionTicket,
64 return *_processWriteNewSessionTicket(state, write);
71 return *_processAppWrite(state, appWrite);
75 _processEarlyAppWrite,
79 return *_processEarlyAppWrite(state, appWrite);
84 return *_processAppClose(state);
96 return _encrypt(resState);
102 std::unique_ptr<folly::IOBuf>& encryptedTicket));
104 std::unique_ptr<folly::IOBuf> encryptedTicket)
const override {
105 return _decrypt(encryptedTicket);
111 res.
version = ProtocolVersion::tls_1_3;
112 res.
cipher = CipherSuite::TLS_AES_128_GCM_SHA256;
118 return std::make_pair(PskType::Resumption,
std::move(res));
121 return std::make_pair(
131 return _decrypt(cookie);
135 template <
typename SM>
140 _fizzHandshakeSuccess();
151 _fizzHandshakeAttemptFallback,
152 void(std::unique_ptr<folly::IOBuf>&));
154 std::unique_ptr<folly::IOBuf> clientHello)
override {
155 return _fizzHandshakeAttemptFallback(clientHello);
161 template <
typename SM>
166 const std::shared_ptr<FizzServerContext>& fizzContext)
170 unique_ptr<MockAsyncFizzServerT, folly::DelayedDestruction::Destructor>;
183 const std::vector<SignatureScheme>& supportedSigSchemes,
184 const std::vector<SignatureScheme>& peerSigSchemes));
187 std::shared_ptr<SelfCert>(
const std::string& identity));
AsyncActions processEarlyAppWrite(const State &state, EarlyAppWrite appWrite) override
#define MOCK_METHOD4(m,...)
#define MOCK_CONST_METHOD1(m,...)
void write(const T &in, folly::io::Appender &appender)
static const std::string chlo
std::chrono::steady_clock::time_point now()
constexpr detail::Map< Move > move
boost::variant< Actions, folly::Future< Actions >> AsyncActions
AsyncActions processWriteNewSessionTicket(const State &state, WriteNewSessionTicket write) override
static AppWrite appWrite(const std::string &str)
folly::Optional< std::string > alpn
requires E e noexcept(noexcept(s.error(std::move(e))))
std::chrono::system_clock::time_point ticketIssueTime
PolymorphicAction< internal::InvokeWithoutArgsAction< FunctionImpl > > InvokeWithoutArgs(FunctionImpl function_impl)
folly::ssl::X509UniquePtr getCert(folly::StringPiece cert)
PUSHMI_INLINE_VAR constexpr __adl::get_executor_fn executor
void fizzHandshakeAttemptFallback(std::unique_ptr< folly::IOBuf > clientHello) override
Actions processAppClose(const State &state) override
AsyncActions processSocketData(const State &state, folly::IOBufQueue &queue) override
std::unique_ptr< AsyncTransportWrapper, Destructor > UniquePtr
void fizzHandshakeError(AsyncFizzServerT< SM > *, folly::exception_wrapper ew) noexceptoverride
MockAsyncFizzServerT(folly::AsyncTransportWrapper::UniquePtr socket, const std::shared_ptr< FizzServerContext > &fizzContext)
NetworkSocket socket(int af, int type, int protocol)
void fizzHandshakeSuccess(AsyncFizzServerT< SM > *) noexceptoverride
#define MOCK_CONST_METHOD3(m,...)
#define ON_CALL(obj, call)
std::unique_ptr< AsyncFizzBase, folly::DelayedDestruction::Destructor > UniquePtr
#define MOCK_METHOD1(m,...)
std::unique_ptr< folly::IOBuf > Buf
folly::Future< std::pair< PskType, folly::Optional< ResumptionState > > > decrypt(std::unique_ptr< folly::IOBuf > encryptedTicket) const override
const internal::AnythingMatcher _
folly::Future< folly::Optional< std::pair< Buf, std::chrono::seconds > > > encrypt(ResumptionState resState) const override
AsyncActions processAccept(const State &state, folly::Executor *executor, std::shared_ptr< const FizzServerContext > context, const std::shared_ptr< ServerExtensions > &extensions) override
static std::unique_ptr< IOBuf > copyBuffer(const void *buf, std::size_t size, std::size_t headroom=0, std::size_t minTailroom=0)
#define MOCK_METHOD2(m,...)
folly::Optional< CookieState > decrypt(Buf cookie) const override
bool check(const dynamic &schema, const dynamic &value, bool check=true)
AsyncActions processAppWrite(const State &state, AppWrite appWrite) override
#define MOCK_METHOD0(m,...)