CharPtr top_label = get_label();
std::string full_address = aliasWithLabel(top_label.get(), alias.c_str());
- RUNNER_ASSERT_MSG_BT(
+ RUNNER_ASSERT_MSG(
CKM_API_SUCCESS == (temp = manager->saveKey(full_address, key, CKM::Policy())),
"Error=" << CKM::ErrorToString(temp));
// lookup by name
- RUNNER_ASSERT_MSG_BT(
+ RUNNER_ASSERT_MSG(
CKM_API_SUCCESS == (temp = manager->getKey(alias, CKM::Password(), key_name)),
"Error=" << CKM::ErrorToString(temp));
- RUNNER_ASSERT_MSG_BT(
+ RUNNER_ASSERT_MSG(
key->getDER() == key_name->getDER(),
"Key value has been changed by service");
// lookup by full address
- RUNNER_ASSERT_MSG_BT(
+ RUNNER_ASSERT_MSG(
CKM_API_SUCCESS == (temp = manager->getKey(full_address, CKM::Password(), key_full_addr)),
"Error=" << CKM::ErrorToString(temp));
- RUNNER_ASSERT_MSG_BT(
+ RUNNER_ASSERT_MSG(
key->getDER() == key_full_addr->getDER(),
"Key value has been changed by service");
}
ap.allowAPI("key-manager::api-storage", "rw");
ap.applyAndSwithToUser(USER_APP, GROUP_APP);
- RUNNER_ASSERT_MSG_BT(
+ RUNNER_ASSERT_MSG(
CKM_API_ERROR_ACCESS_DENIED == (temp = manager->createKeyPairRSA(2048, CKM::Alias("iamsomebodyelse PRV_KEY2_RSA"), CKM::Alias("PUB_KEY2_RSA"), CKM::Policy(), CKM::Policy())),
"Error=" << CKM::ErrorToString(temp));
- RUNNER_ASSERT_MSG_BT(
+ RUNNER_ASSERT_MSG(
CKM_API_ERROR_ACCESS_DENIED == (temp = manager->createKeyPairRSA(2048, CKM::Alias("PRV_KEY2_RSA"), CKM::Alias("iamsomebodyelse PUB_KEY2_RSA"), CKM::Policy(), CKM::Policy())),
"Error=" << CKM::ErrorToString(temp));
}
int ret;
auto manager = CKM::Manager::create();
- RUNNER_ASSERT_MSG_BT(
+ RUNNER_ASSERT_MSG(
CKM_API_ERROR_ACCESS_DENIED == (ret = manager->saveKey(alias, key, CKM::Policy())),
"Error=" << CKM::ErrorToString(ret));
}
int temp;
auto manager = CKM::Manager::create();
- RUNNER_ASSERT_MSG_BT(
+ RUNNER_ASSERT_MSG(
CKM_API_ERROR_ACCESS_DENIED == (temp = manager->saveCertificate(alias, cert, CKM::Policy())),
"Error=" << CKM::ErrorToString(temp));
}
int temp;
auto manager = CKM::Manager::create();
- RUNNER_ASSERT_MSG_BT(
+ RUNNER_ASSERT_MSG(
CKM_API_ERROR_ACCESS_DENIED == (temp = manager->saveData(alias, buffer, CKM::Policy())),
"Error=" << CKM::ErrorToString(temp));
}
RUNNER_ASSERT_MSG(
CKM_API_SUCCESS == (tmp = control->changeUserPassword(USER_APP,"","user-pass")),
"Error=" << CKM::ErrorToString(tmp));
+ // confirm changed password
+ RUNNER_ASSERT_MSG(
+ CKM_API_SUCCESS == (tmp = control->unlockUserKey(USER_APP,"user-pass")),
+ CKM::ErrorToString(tmp));
RUNNER_ASSERT_MSG(
CKM_API_SUCCESS == (tmp = control->lockUserKey(USER_APP)),
- "Error=" << CKM::ErrorToString(tmp));
+ CKM::ErrorToString(tmp));
}
RUNNER_CHILD_TEST(T1613_unlock_default_passwd_negative)