9 #include <gmock/gmock.h> 10 #include <gtest/gtest.h> 15 using namespace folly;
21 namespace extensions {
25 "1234567890012345689012345678901234567890123456789012345678901234"};
30 OpenSSL_add_all_algorithms();
31 EcKeyUniquePtr ecKey(EC_KEY_new_by_curve_name(NID_X9_62_prime256v1));
33 if (!ecKey || !key_) {
34 throw std::runtime_error(
"Unable to initialize key");
36 if (EC_KEY_generate_key(ecKey.get()) != 1) {
37 throw std::runtime_error(
"Unable to generate EC Key");
39 if (EVP_PKEY_set1_EC_KEY(key_.get(), ecKey.get()) != 1) {
40 throw std::runtime_error(
"Unable to set EC key");
53 auto ekmBuf = getBuf(
ekm);
54 auto binding = TokenBindingConstructor::createTokenBinding(
57 TokenBindingKeyParameters::ecdsap256,
58 TokenBindingType::provided_token_binding);
60 Validator::validateTokenBinding(
61 std::move(binding), ekmBuf, TokenBindingKeyParameters::ecdsap256)
67 auto ekmBuf = getBuf(
ekm);
69 TokenBindingConstructor::createTokenBinding(
72 TokenBindingKeyParameters::ecdsap256,
73 TokenBindingType::provided_token_binding),
bool unhexlify(const InputString &input, OutputString &output)
#define EXPECT_THROW(statement, expected_exception)
constexpr detail::Map< Move > move
Buf getBuf(StringPiece hex)
std::unique_ptr< EVP_PKEY, EvpPkeyDeleter > EvpPkeyUniquePtr
—— Concurrent Priority Queue Implementation ——
std::unique_ptr< EC_KEY, EcKeyDeleter > EcKeyUniquePtr
constexpr auto data(C &c) -> decltype(c.data())
TEST_F(AsyncSSLSocketWriteTest, write_coalescing1)
#define EXPECT_TRUE(condition)
std::unique_ptr< folly::IOBuf > Buf
static std::unique_ptr< IOBuf > copyBuffer(const void *buf, std::size_t size, std::size_t headroom=0, std::size_t minTailroom=0)