RUNNER_ASSERT_MSG(
CKM_API_SUCCESS == (temp = control->lockUserKey(USER_APP_2)),
"Error=" << CKM::ErrorToString(temp));
+#ifndef PASSWORD_PROTECTION_DISABLE
RUNNER_ASSERT_MSG(
CKM_API_ERROR_AUTHENTICATION_FAILED == (temp = control->unlockUserKey(USER_APP_2, "incorrect-password")),
"Error=" << CKM::ErrorToString(temp));
+#endif
RUNNER_ASSERT_MSG(
CKM_API_SUCCESS == (temp = control->removeUserData(USER_APP_2)),
"Error=" << CKM::ErrorToString(temp));
int status1 = manager->getKey(CKM::Alias("CertEEE"), CKM::Password(), ptr);
+#ifndef PASSWORD_PROTECTION_DISABLE
RUNNER_ASSERT_MSG(
CKM_API_ERROR_DB_LOCKED == status1,
"Could not get key from locked database. Error=" << CKM::ErrorToString(status1));
+#else
+ RUNNER_ASSERT_MSG(
+ CKM_API_ERROR_DB_ALIAS_UNKNOWN == status1,
+ "Could not get key with a wrong alias. Error=" << CKM::ErrorToString(status1));
+#endif
}
RUNNER_TEST(T1905_deinit)