CKM: tests adjusted to tizenorg.
[platform/core/test/security-tests.git] / tests / ckm / async-api.cpp
index d4de100..9b200dd 100644 (file)
@@ -411,7 +411,9 @@ RUNNER_TEST(TA0000_init)
     int temp;
     ControlShPtr control = Control::create();
     RUNNER_ASSERT_MSG(CKM_API_SUCCESS == (temp = control->removeUserData(APP_UID)),
-                         "Error=" << ErrorToString(temp));
+                      "Error=" << ErrorToString(temp));
+    RUNNER_ASSERT_MSG(CKM_API_SUCCESS == (temp = control->unlockUserKey(APP_UID, TEST_PASS)),
+                      "Error=" << ErrorToString(temp));
 }
 
 // saveKey
@@ -1187,7 +1189,6 @@ RUNNER_CHILD_TEST(TA1720_ocsp_check_negative)
 
 RUNNER_CHILD_TEST(TA1750_ocsp_check_positive)
 {
-    RUNNER_IGNORED_MSG("Fixed in next version of ckm!");
     switch_to_storage_ocsp_user(TEST_LABEL);
 
     DBCleanup dbc;
@@ -1298,27 +1299,26 @@ RUNNER_TEST(TA2000_PKCS_add_bundle_with_chain_certs)
     memcpy(buffer.data(), buff.data(), buff.size());
 
     auto pkcs = CKM::PKCS12::create(buffer, CKM::Password());
-    RUNNER_ASSERT_MSG_BT(
+    RUNNER_ASSERT_MSG(
         NULL != pkcs.get(),
         "Error in PKCS12::create()");
 
     auto cert = pkcs->getCertificate();
-    RUNNER_ASSERT_MSG_BT(
+    RUNNER_ASSERT_MSG(
         NULL != cert.get(),
         "Error in PKCS12::getCertificate()");
 
     auto key = pkcs->getKey();
-    RUNNER_ASSERT_MSG_BT(
+    RUNNER_ASSERT_MSG(
         NULL != key.get(),
         "Error in PKCS12::getKey()");
 
     auto caVector = pkcs->getCaCertificateShPtrVector();
-    RUNNER_ASSERT_MSG_BT(
+    RUNNER_ASSERT_MSG(
         2 == caVector.size(),
         "Wrong size of vector");
 
     // save to the CKM
-    int tmp;
     CKM::Policy exportable;
     CKM::Policy notExportable(CKM::Password(), false);
 
@@ -1350,7 +1350,6 @@ RUNNER_TEST(TA2000_PKCS_add_bundle_with_chain_certs)
 RUNNER_TEST(TA2010_PKCS_get)
 {
     DBCleanup dbc;
-    int temp;
     auto manager = CKM::Manager::create();
 
     // fail - no entry
@@ -1375,17 +1374,17 @@ RUNNER_TEST(TA2010_PKCS_get)
                              CKM::Password());
 
     auto cert = obs->m_pkcs->getCertificate();
-    RUNNER_ASSERT_MSG_BT(
+    RUNNER_ASSERT_MSG(
         NULL != cert.get(),
         "Error in PKCS12::getCertificate()");
 
     auto key = obs->m_pkcs->getKey();
-    RUNNER_ASSERT_MSG_BT(
+    RUNNER_ASSERT_MSG(
         NULL != key.get(),
         "Error in PKCS12::getKey()");
 
     auto caVector = obs->m_pkcs->getCaCertificateShPtrVector();
-    RUNNER_ASSERT_MSG_BT(
+    RUNNER_ASSERT_MSG(
         2 == caVector.size(),
         "Wrong size of vector");
 }