9 #include <gmock/gmock.h> 10 #include <gtest/gtest.h> 16 using namespace folly;
30 "002f005400520028434e3d4c696d696e616c6974792c204f553d46697a7a2c204f3d46616365626f6f6b2c20433d55530026434e3d457465726e6974792c204f553d46697a7a2c204f3d46616365626f6f6b2c20433d5553"};
37 auto exts = getExtensions(
alpn);
38 auto ext = getExtension<ProtocolNameList>(exts);
40 EXPECT_EQ(ext->protocol_name_list.size(), 3);
42 StringPiece(ext->protocol_name_list[0].name->coalesce()),
45 StringPiece(ext->protocol_name_list[1].name->coalesce()),
48 StringPiece(ext->protocol_name_list[2].name->coalesce()),
55 auto exts = getExtensions(
sni);
56 auto ext = getExtension<ServerNameList>(exts);
58 EXPECT_EQ(ext->server_name_list.size(), 1);
59 EXPECT_EQ(ext->server_name_list[0].name_type, ServerNameType::host_name);
61 StringPiece(ext->server_name_list[0].hostname->coalesce()),
69 auto ext = getExtension<HelloRetryRequestKeyShare>(exts);
71 EXPECT_EQ(ext->selected_group, NamedGroup::secp256r1);
78 auto ext = getExtension<ClientEarlyData>(exts);
84 auto ext = getExtension<ServerEarlyData>(exts);
90 auto ext = getExtension<TicketEarlyData>(exts);
96 auto exts = getExtensions(
cookie);
97 auto ext = getExtension<Cookie>(exts);
106 auto ext = getExtension<CertificateAuthorities>(exts);
110 StringPiece(ext->authorities[0].encoded_name->coalesce()),
111 StringPiece(
"CN=Liminality, OU=Fizz, O=Facebook, C=US"));
113 StringPiece(ext->authorities[1].encoded_name->coalesce()),
114 StringPiece(
"CN=Eternity, OU=Fizz, O=Facebook, C=US"));
121 auto ext = getExtension<CertificateCompressionAlgorithms>(exts);
124 EXPECT_EQ(ext->algorithms[0], CertificateCompressionAlgorithm::zlib);
129 auto buf = getBuf(
sni);
132 std::vector<Extension> exts;
137 EXPECT_THROW(getExtension<ServerNameList>(exts), std::runtime_error);
#define EXPECT_THROW(statement, expected_exception)
#define EXPECT_EQ(val1, val2)
constexpr detail::Map< Move > move
StringPiece ticketEarlyData
—— Concurrent Priority Queue Implementation ——
StringPiece clientEarlyData
StringPiece certCompressionAlgorithms
StringPiece helloRetryRequestKeyShare
StringPiece serverEarlyData
TEST_F(AsyncSSLSocketWriteTest, write_coalescing1)
ExtensionType extension_type
const internal::AnythingMatcher _
Range< const char * > StringPiece