9 #include <gtest/gtest.h> 13 using namespace folly;
22 OpenSSL_add_all_algorithms();
30 ctx(EVP_PKEY_CTX_new_id(EVP_PKEY_RSA,
nullptr));
31 EVP_PKEY_keygen_init(ctx.get());
32 EVP_PKEY_CTX_set_rsa_keygen_bits(ctx.get(), 2048);
33 EVP_PKEY* keyPtr{
nullptr};
34 EVP_PKEY_keygen(ctx.get(), &keyPtr);
42 auto sig = rsa.
sign<SignatureScheme::rsa_pss_sha256>(msg);
43 rsa.
verify<SignatureScheme::rsa_pss_sha256>(msg,
sig->coalesce());
51 auto sig = rsa.
sign<SignatureScheme::rsa_pss_sha256>(msg1);
53 rsa.
verify<SignatureScheme::rsa_pss_sha256>(msg2,
sig->coalesce()),
61 auto sig = rsa.
sign<SignatureScheme::rsa_pss_sha256>(msg);
62 sig->writableData()[1] ^= 0x2;
64 rsa.
verify<SignatureScheme::rsa_pss_sha256>(msg,
sig->coalesce()),
#define EXPECT_THROW(statement, expected_exception)
std::unique_ptr< folly::IOBuf > sign(folly::ByteRange data) const
std::unique_ptr< EVP_PKEY, EvpPkeyDeleter > EvpPkeyUniquePtr
—— Concurrent Priority Queue Implementation ——
void verify(folly::ByteRange data, folly::ByteRange signature) const
constexpr detail::Sig< Sig > const sig
TEST_F(AsyncSSLSocketWriteTest, write_coalescing1)
static EvpPkeyUniquePtr generateKey()
void setKey(folly::ssl::EvpPkeyUniquePtr pkey)