CKM: no more "empty password for lockscreen" logics.
[platform/core/test/security-tests.git] / tests / ckm / capi-access_control.cpp
index 775e053..b985503 100644 (file)
@@ -233,11 +233,10 @@ RUNNER_TEST_GROUP_INIT (T300_CKMC_ACCESS_CONTROL_C_API);
 RUNNER_TEST(T3000_init)
 {
     int temp;
-    RUNNER_ASSERT_MSG(CKMC_ERROR_NONE == (temp = ckmc_unlock_user_key(APP_UID, APP_PASS)), CKMCErrorToString(temp));
     RUNNER_ASSERT_MSG(CKMC_ERROR_NONE == (temp = ckmc_remove_user_data(APP_UID)), CKMCErrorToString(temp));
-    RUNNER_ASSERT_MSG(CKMC_ERROR_NONE == (temp = ckmc_unlock_user_key(USER_ROOT, ROOT_PASS)), CKMCErrorToString(temp));
+    RUNNER_ASSERT_MSG(CKMC_ERROR_NONE == (temp = ckmc_unlock_user_key(APP_UID, APP_PASS)), CKMCErrorToString(temp));
     RUNNER_ASSERT_MSG(CKMC_ERROR_NONE == (temp = ckmc_remove_user_data(USER_ROOT)), CKMCErrorToString(temp));
-
+    RUNNER_ASSERT_MSG(CKMC_ERROR_NONE == (temp = ckmc_unlock_user_key(USER_ROOT, ROOT_PASS)), CKMCErrorToString(temp));
 }
 
 // invalid arguments check
@@ -538,28 +537,8 @@ RUNNER_TEST(T3030_manager_get_all_aliases)
     }
 }
 
-RUNNER_TEST(T3031_manager_test_decrypt_from_another_label)
-{
-    int temp;
-    CharPtr top_label = get_label();
-    ScopedSaveData ssd(TEST_ALIAS);
-
-    allow_access(TEST_ALIAS, TEST_LABEL2, CKMC_PERMISSION_READ);
-    {
-        ScopedLabel sl(TEST_LABEL2);
-
-        check_read_allowed(aliasWithLabel(top_label.get(), TEST_ALIAS).c_str());
-
-        // remove the DKEK key - so that on read it must be added again
-        RUNNER_ASSERT_MSG(CKMC_ERROR_NONE == (temp = ckmc_lock_user_key(0)), CKMCErrorToString(temp));
-
-        // on this read, DKEK key will be added again
-        check_read_allowed(aliasWithLabel(top_label.get(), TEST_ALIAS).c_str());
-    }
-}
-
 // tries to access other application data with permission
-RUNNER_TEST(T3032_manager_deprecated_access_allowed)
+RUNNER_TEST(T3031_manager_deprecated_access_allowed)
 {
     CharPtr top_label = get_label();
     ScopedSaveData ssd(TEST_ALIAS);
@@ -573,7 +552,7 @@ RUNNER_TEST(T3032_manager_deprecated_access_allowed)
 }
 
 // tries to read other application data with permission for read/remove
-RUNNER_TEST(T3033_manager_deprecated_access_allowed_with_remove)
+RUNNER_TEST(T3032_manager_deprecated_access_allowed_with_remove)
 {
     CharPtr top_label = get_label();
     ScopedSaveData ssd(TEST_ALIAS);
@@ -587,7 +566,7 @@ RUNNER_TEST(T3033_manager_deprecated_access_allowed_with_remove)
 }
 
 // tries to remove other application data with permission for reading only
-RUNNER_TEST(T3034_manager_deprecated_access_allowed_remove_denied)
+RUNNER_TEST(T3033_manager_deprecated_access_allowed_remove_denied)
 {
     CharPtr top_label = get_label();
     ScopedSaveData ssd(TEST_ALIAS);
@@ -603,7 +582,7 @@ RUNNER_TEST(T3034_manager_deprecated_access_allowed_remove_denied)
 }
 
 // tries to remove other application data with permission
-RUNNER_TEST(T3035_manager_deprecated_remove_allowed)
+RUNNER_TEST(T3034_manager_deprecated_remove_allowed)
 {
     CharPtr top_label = get_label();
     ScopedSaveData ssd(TEST_ALIAS);