const KeyAliasPair PEERS2 = { "peer2_ec_private", "peer2_ec_public" };
const KeyAliasPair WRONG = { "wrong_ec_private", "wrong_ec_public" };
const KeyAliasPair RSA = { "rsa_private", "rsa_public" };
+const KeyAliasPair RSA_EXPORTABLE = { "rsa_private_exp", "rsa_public_exp" };
const std::string DERIVED = "derived";
const std::string DERIVED2 = "derived2";
const std::string SECRET = "secret";
RSA.pub.c_str(),
UNEXPORTABLE,
EXPORTABLE);
+
+ assert_positive(ckmc_create_key_pair_rsa,
+ 1024,
+ RSA_EXPORTABLE.prv.c_str(),
+ RSA_EXPORTABLE.pub.c_str(),
+ EXPORTABLE,
+ EXPORTABLE);
}
void Finish() override
remove(PEERS2);
remove(WRONG);
remove(RSA);
+ remove(RSA_EXPORTABLE);
int ret = ckmc_lock_user_key(UID);
if (ret != CKMC_ERROR_NONE)
RUNNER_TEST(TECDH_0220_different_key_types, DerivedFixture)
{
- deriveEcdh(OURS.prv, "", RSA.pub, DERIVED, UNEXPORTABLE, CKMC_ERROR_INVALID_PARAMETER);
+ deriveEcdh(OURS.prv, "", RSA_EXPORTABLE.pub, DERIVED, UNEXPORTABLE, CKMC_ERROR_INVALID_PARAMETER);
deriveEcdh(RSA.prv, "", OURS.pub, DERIVED, UNEXPORTABLE, CKMC_ERROR_INVALID_PARAMETER);
}
RUNNER_TEST(TECDH_0230_wrong_key_types, DerivedFixture)
{
- deriveEcdh(RSA.prv, "", RSA.pub, DERIVED, UNEXPORTABLE, CKMC_ERROR_INVALID_PARAMETER);
+ deriveEcdh(RSA.prv, "", RSA_EXPORTABLE.pub, DERIVED, UNEXPORTABLE, CKMC_ERROR_INVALID_PARAMETER);
}