Remove key-manager::api-storage privilege use in CKM tests
[platform/core/test/security-tests.git] / src / ckm / privileged / initial-values.cpp
index e8988de..f4d1bb6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2015 - 2019 Samsung Electronics Co.
+ *  Copyright (c) 2015 - 2020 Samsung Electronics Co.
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -153,8 +153,7 @@ RUNNER_TEST(T6010_PARSE_XML_FILE_AT_STARTUP)
     // [test2]
     {
         ScopedDBUnlock unlock(USER_APP, APP_PASS);
-        ScopedAccessProvider ap(TEST_LABEL);
-        ap.applyAndSwithToUser(USER_APP, GROUP_APP);
+        ScopedAccessProvider ap(TEST_LABEL, USER_APP, GROUP_APP);
 
         check_key(XML_1_EXPECTED_KEY_1_RSA.c_str(), CKMC_ERROR_NOT_EXPORTABLE);
         check_key_not_visible(XML_1_EXPECTED_KEY_2_RSA.c_str());
@@ -166,8 +165,7 @@ RUNNER_TEST(T6010_PARSE_XML_FILE_AT_STARTUP)
     // [test3]
     {
         ScopedDBUnlock unlock(USER_APP, APP_PASS);
-        ScopedAccessProvider ap(TEST_LABEL_2);
-        ap.applyAndSwithToUser(USER_APP, GROUP_APP);
+        ScopedAccessProvider ap(TEST_LABEL_2, USER_APP, GROUP_APP);
 
         check_key_not_visible(XML_1_EXPECTED_KEY_1_RSA.c_str());
         check_key_allowed(XML_1_EXPECTED_KEY_2_RSA.c_str(), CKMC_KEY_RSA_PRIVATE);