9 #include <gmock/gmock.h> 10 #include <gtest/gtest.h> 18 using namespace folly;
22 "c44ed3fb98c179579036d201735f43af20a856470b9c527fe07f01f3a2a0bde9"};
25 "1603030099020000950303cf21ad74e59a6111be1d8c021e65b891c2a211167abb8c5e079e09e2c8a8339c00130100006d002b00020304002c0063006144444444444444444444444444444444444444444444444444444444444444440000000099d67e4a6c0776e1b52119d2d06dc27c9d40d131856e077b6ef9901c652910a92a703a91fc04d90e1700ce9d4247fd0bf575aed4482be227d61a7b725d"};
28 "16030300a10200009d0303cf21ad74e59a6111be1d8c021e65b891c2a211167abb8c5e079e09e2c8a8339c001301000075002b00020304003300020017002c0065006344444444444444444444444444444444444444444444444444444444444444440000000099d67e4a6d07414a08e5e0be2f66b9982a741909c185f48630afa8abd44c5dab460001c8948e4cdd0b74af9a53ed5665c295eed49d1862d4967c0ed002780b"};
31 "444444444444444444444444444444444444444444444444444444444444444400000000e5c57e4a6c07762b1c4fcbc41e05abbc7f964506ce11cec423060f95f3a263df93e8e573f6abcf0e1700ce9d42df8b8fdf63535b8e3c6bed8f919a4ef5"};
34 "444444444444444444444444444444444444444444444444444444444444444400000000e5c57e4a6d07414a082f49d0fd7077f043b4fbdf55b2bff9f910e5544bc5cb203576b8504b6c46721d74af9a53ed5602983e52a143aeb7854637e22261263c"};
43 context_ = std::make_shared<FizzServerContext>();
45 cipher_ = std::make_shared<AES128CookieCipher>();
46 cipher_->setContext(context_.get());
49 std::vector<ByteRange> cookieSecrets{{
s->coalesce()}};
69 std::shared_ptr<AES128CookieCipher>
cipher_;
74 auto res = cipher_->getTokenOrRetry(
76 auto msg =
std::move(boost::get<StatelessHelloRetryRequest>(res));
83 auto res = cipher_->getTokenOrRetry(
85 auto msg =
std::move(boost::get<StatelessHelloRetryRequest>(res));
90 auto res = cipher_->getTokenOrRetry(
92 auto token =
std::move(boost::get<AppToken>(res));
98 cipher_->getTokenOrRetry(
130 std::vector<ByteRange> cookieSecrets{{
range(s1),
range(s2),
s->coalesce()}};
142 std::vector<ByteRange> cookieSecrets{{
range(s1),
range(s2)}};
Buf encodeHandshake(T &&handshakeMsg)
Buf getClientHello(Buf cookie)
static constexpr StringPiece retry
#define EXPECT_THROW(statement, expected_exception)
static const std::string chlo
#define EXPECT_EQ(val1, val2)
std::shared_ptr< AES128CookieCipher > cipher_
constexpr detail::Map< Move > move
virtual TLSContent writeInitialClientHello(Buf encodedClientHello) const
—— Concurrent Priority Queue Implementation ——
static constexpr StringPiece testCookieGroup
static ClientHello getClientHello(const Factory &, const Random &random, const std::vector< CipherSuite > &supportedCiphers, const std::vector< ProtocolVersion > &supportedVersions, const std::vector< NamedGroup > &supportedGroups, const std::map< NamedGroup, std::unique_ptr< KeyExchange >> &shares, const std::vector< SignatureScheme > &supportedSigSchemes, const std::vector< PskKeyExchangeMode > &supportedPskModes, const folly::Optional< std::string > &hostname, const std::vector< std::string > &supportedAlpns, const std::vector< CertificateCompressionAlgorithm > &compressionAlgos, const Optional< EarlyDataParams > &earlyDataParams, const Buf &legacySessionId, ClientExtensions *extensions, Buf cookie=nullptr)
Gen range(Value begin, Value end)
static constexpr StringPiece testCookie
std::unique_ptr< folly::IOBuf > toIOBuf(std::string hexData, size_t headroom, size_t tailroom)
static constexpr StringPiece retryGroup
std::shared_ptr< FizzServerContext > context_
#define EXPECT_TRUE(condition)
TEST_F(RSAPSSTest, TestSignVerify)
std::unique_ptr< folly::IOBuf > Buf
static constexpr StringPiece secret
#define EXPECT_FALSE(condition)
Extension encodeExtension(const TokenBindingParameters ¶ms)
bool hexlify(const InputString &input, OutputString &output, bool append_output)
static std::unique_ptr< IOBuf > copyBuffer(const void *buf, std::size_t size, std::size_t headroom=0, std::size_t minTailroom=0)
static ClientHello clientHello()