#include "anonymous_tokens/cpp/crypto/rsa_blind_signer.h"
#include <memory>
#include <random>
#include <string>
#include <utility>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/string_view.h"
#include "anonymous_tokens/cpp/crypto/constants.h"
#include "anonymous_tokens/cpp/crypto/crypto_utils.h"
#include "anonymous_tokens/cpp/crypto/rsa_ssa_pss_verifier.h"
#include "anonymous_tokens/cpp/testing/proto_utils.h"
#include "anonymous_tokens/cpp/testing/utils.h"
#include "anonymous_tokens/proto/anonymous_tokens.pb.h"
#include <openssl/digest.h>
#include <openssl/rsa.h>
namespace anonymous_tokens {
namespace {
CreateTestKeyPairFunction;
class RsaBlindSignerTest
: public ::testing::TestWithParam<CreateTestKeyPairFunction *> { … };
TEST_P(RsaBlindSignerTest, StandardSignerWorks) { … }
TEST_P(RsaBlindSignerTest, SignerFails) { … }
INSTANTIATE_TEST_SUITE_P(…);
RsaBlindSignerPublicMetadataTestParams;
class RsaBlindSignerTestWithPublicMetadata
: public ::testing::TestWithParam<RsaBlindSignerPublicMetadataTestParams> { … };
TEST_P(RsaBlindSignerTestWithPublicMetadata, SignerWorksWithPublicMetadata) { … }
TEST_P(RsaBlindSignerTestWithPublicMetadata,
SignerWorksWithEmptyPublicMetadata) { … }
TEST_P(RsaBlindSignerTestWithPublicMetadata,
SignatureFailstoVerifyWithWrongPublicMetadata) { … }
TEST_P(RsaBlindSignerTestWithPublicMetadata,
SignatureFailsToVerifyWithNoPublicMetadata) { … }
INSTANTIATE_TEST_SUITE_P(…);
TEST(IetfRsaBlindSignerTest,
IetfRsaBlindSignaturesWithPublicMetadataTestVectorsSuccess) { … }
TEST(IetfRsaBlindSignerTest,
IetfPartiallyBlindRsaSignaturesNoPublicExponentTestVectorsSuccess) { … }
}
}