const char* const ENABLED = "Enabled";
const char* const ENFORCING = "Enforcing";
const char* const DISABLED = "Disabled";
+const char* const READY = "Ready";
const char* const CKM_LOCK = "/var/run/key-manager.pid";
mdpp.set(DISABLED);
update_cc_mode();
+ mdpp.set(READY);
+ update_cc_mode();
+
mdpp.set("whatever");
update_cc_mode();
}
update_cc_mode();
read_keys(CKM_API_ERROR_BAD_REQUEST);
+ mdpp.set(READY);
+ update_cc_mode();
+ read_keys(CKM_API_SUCCESS);
+
mdpp.set("whatever");
update_cc_mode();
read_keys(CKM_API_SUCCESS);
usleep(SLEEP); // give some time for notification to reach ckm
read_keys(CKM_API_ERROR_BAD_REQUEST);
+ mdpp.set(READY);
+ usleep(SLEEP); // give some time for notification to reach ckm
+ read_keys(CKM_API_SUCCESS);
+
mdpp.set(ENFORCING);
usleep(SLEEP); // give some time for notification to reach ckm
read_keys(CKM_API_ERROR_BAD_REQUEST);
}
// run ckm manually and see if it properly loads mdpp setting
+RUNNER_TEST(TCC_0075_manualCkmReady)
+{
+ restart_ckm(READY);
+
+ remove_user_data();
+ save_keys();
+ read_keys(CKM_API_SUCCESS);
+}
+
+// run ckm manually and see if it properly loads mdpp setting
RUNNER_TEST(TCC_0080_manualCkmWhatever)
{
restart_ckm("whatever");