9 #include <gmock/gmock.h> 10 #include <gtest/gtest.h> 15 using namespace folly;
23 namespace extensions {
28 "9d20b2acf86f893a240642593cfc53102b9fb76b37f059d4bff47a0e6fee25e7"};
30 "40dd2fa2430a0f54ca96454bdf23c264353a252812bc5fa7b851a6fa9d620424bf43e20e50a4ca0a1769f4024db346ca5075eecdb7f62d0018cf1642b75f679d98"};
32 "d2c9c04957013f38369a18a5d5b47d6492f0f0f5c8772a27cc3770f23dda94d30fc3a6d0dc110c78e668a44c3b8b61842a6e72795f61f51f398f8dedd2ceb9a3"};
37 OpenSSL_add_all_algorithms();
48 case TokenBindingKeyParameters::ecdsap256: {
55 throw std::runtime_error(
"not implemented");
69 "3060FED4BA255A9D31C961EB74C6356D68C049B8923B41AE9E95628BC64F2F1B20C2D7E9F5177A3C294D4461FA6CE669622E60F29FB67903FE1008B8BC99A62299"};
70 auto binding = setUpWithKeyParameters(TokenBindingKeyParameters::ecdsap256);
72 binding.tokenbindingid.key = getBuf(bad_ecdsa_key);
74 Validator::validateTokenBinding(
75 std::move(binding), ekm_, TokenBindingKeyParameters::ecdsap256)
80 auto binding = setUpWithKeyParameters(TokenBindingKeyParameters::ecdsap256);
82 Validator::validateTokenBinding(
83 std::move(binding), ekm_, TokenBindingKeyParameters::rsa2048_pss)
88 auto binding = setUpWithKeyParameters(TokenBindingKeyParameters::ecdsap256);
90 Validator::validateTokenBinding(
91 std::move(binding), ekm_, TokenBindingKeyParameters::ecdsap256)
96 auto binding = setUpWithKeyParameters(TokenBindingKeyParameters::ecdsap256);
97 *binding.signature->writableData() ^= 0x04;
99 Validator::validateTokenBinding(
100 std::move(binding), ekm_, TokenBindingKeyParameters::ecdsap256)
105 auto binding = setUpWithKeyParameters(TokenBindingKeyParameters::ecdsap256);
106 binding.signature->trimEnd(4);
108 Validator::validateTokenBinding(
109 std::move(binding), ekm_, TokenBindingKeyParameters::ecdsap256)
bool unhexlify(const InputString &input, OutputString &output)
static std::unique_ptr< IOBuf > create(std::size_t capacity)
constexpr detail::Map< Move > move
—— Concurrent Priority Queue Implementation ——
TokenBindingType tokenbinding_type
TokenBindingKeyParameters
constexpr Params params[]
constexpr auto data(C &c) -> decltype(c.data())
TokenBindingKeyParameters key_parameters
TEST_F(AsyncSSLSocketWriteTest, write_coalescing1)
TokenBindingID tokenbindingid
#define EXPECT_TRUE(condition)
std::unique_ptr< folly::IOBuf > Buf
StringPiece chrome_session_signature
const internal::AnythingMatcher _
#define EXPECT_FALSE(condition)
TokenBinding setUpWithKeyParameters(TokenBindingKeyParameters params)
StringPiece chrome_session_ekm
static std::unique_ptr< IOBuf > copyBuffer(const void *buf, std::size_t size, std::size_t headroom=0, std::size_t minTailroom=0)
StringPiece chrome_session_key
Buf getBuf(StringPiece hex)