Modify some test codes according to key-manager's 2.4 API changes
[platform/core/test/security-tests.git] / tests / ckm / capi-testcases.cpp
index 4674a5c..d7af5b0 100644 (file)
@@ -2179,7 +2179,7 @@ RUNNER_TEST(T3097_CAPI_TYPE_load_p12_file2) {
     ckmc_pkcs12_s *ppkcs12 = NULL;
 
     RUNNER_ASSERT_MSG(
-            CKMC_ERROR_NONE == (temp = ckmc_load_from_pkcs12_file2(p12file, password, &ppkcs12)),
+            CKMC_ERROR_NONE == (temp = ckmc_pkcs12_load(p12file, password, &ppkcs12)),
             CKMCReadableError(temp));
     RUNNER_ASSERT_MSG(ppkcs12->priv_key != NULL, "Null private_key");
     RUNNER_ASSERT_MSG(ppkcs12->cert != NULL, "Null cert");
@@ -2268,7 +2268,7 @@ RUNNER_TEST(T3102_CAPI_PKCS12_negative_wrong_password)
     ckmc_pkcs12_s *ppkcs12 = NULL;
     int temp;
     RUNNER_ASSERT_MSG(
-            CKMC_ERROR_INVALID_FORMAT == (temp = ckmc_load_from_pkcs12_file2("/usr/share/ckm-test/test1801.pkcs12", wrong_passwd, &ppkcs12)),
+            CKMC_ERROR_INVALID_FORMAT == (temp = ckmc_pkcs12_load("/usr/share/ckm-test/test1801.pkcs12", wrong_passwd, &ppkcs12)),
             CKMCReadableError(temp));
 }
 
@@ -2277,7 +2277,7 @@ RUNNER_TEST(T3103_CAPI_PKCS12_add_bundle_with_chain_certs)
     ckmc_pkcs12_s *ppkcs12 = NULL;
     int temp;
     RUNNER_ASSERT_MSG(
-            CKMC_ERROR_NONE == (temp = ckmc_load_from_pkcs12_file2("/usr/share/ckm-test/pkcs.p12", NULL, &ppkcs12)),
+            CKMC_ERROR_NONE == (temp = ckmc_pkcs12_load("/usr/share/ckm-test/pkcs.p12", NULL, &ppkcs12)),
             CKMCReadableError(temp));
 
     RUNNER_ASSERT_MSG(NULL != ppkcs12->cert, "no certificate in PKCS12");