X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fckm%2Fprivileged%2Fcc-mode.cpp;h=eeddb27bb015bd445d665cec974f007a72c5fa9b;hb=73f509909a3e4942cc60efbe5963e3bcac9cd7d4;hp=b2b29dbdb7e9e35c27efb9b73c45a1197c7d5a7d;hpb=476ebec06ecae35f131b5b22a5dd00da058fe1c9;p=platform%2Fcore%2Ftest%2Fsecurity-tests.git diff --git a/src/ckm/privileged/cc-mode.cpp b/src/ckm/privileged/cc-mode.cpp index b2b29db..eeddb27 100644 --- a/src/ckm/privileged/cc-mode.cpp +++ b/src/ckm/privileged/cc-mode.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2000 - 2019 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,6 +34,7 @@ #include #include #include +#include using namespace CKM; using namespace std; @@ -73,13 +74,13 @@ private: MdppState::MdppState() { - ScopedLabel sl(USER_LABEL); + ScopedProcessLabel spl(USER_LABEL); m_original = vconf_get_str(VCONFKEY_SECURITY_MDPP_STATE); } MdppState::~MdppState() { - ScopedLabel sl(USER_LABEL); + ScopedProcessLabel spl(USER_LABEL); if (!m_original) vconf_set_str(VCONFKEY_SECURITY_MDPP_STATE, UNSET); else { @@ -89,7 +90,7 @@ MdppState::~MdppState() void MdppState::set(const char* const value) { - ScopedLabel sl(USER_LABEL); + ScopedProcessLabel spl(USER_LABEL); if (value) { int ret = vconf_set_str(VCONFKEY_SECURITY_MDPP_STATE, value); @@ -121,7 +122,7 @@ void save_keys() rsa_pub_alias, Policy(Password(), true), Policy(Password(), true))), - "Error=" << CKMErrorToString(temp)); + "Error=" << APICodeToString(temp)); RUNNER_ASSERT_MSG( CKM_API_SUCCESS == (temp = manager->createKeyPairECDSA( @@ -130,14 +131,14 @@ void save_keys() ecdsa_pub_alias, Policy(Password(), true), Policy(Password(), true))), - "Error=" << CKMErrorToString(temp)); + "Error=" << APICodeToString(temp)); RUNNER_ASSERT_MSG( CKM_API_SUCCESS == (temp = manager->createKeyAES( aes_length, aes_alias, Policy(Password(), true))), - "Error=" << CKMErrorToString(temp)); + "Error=" << APICodeToString(temp)); } void read_key(ManagerShPtr& manager, const Alias& alias, int expected) { @@ -145,8 +146,8 @@ void read_key(ManagerShPtr& manager, const Alias& alias, int expected) { int temp; RUNNER_ASSERT_MSG( expected == (temp = manager->getKey(alias, Password(), key)), - "Expected: " << expected << "/" << CKMErrorToString(expected) << " got: " << temp << "/" << - CKMErrorToString(temp)); + "Expected: " << expected << "/" << APICodeToString(expected) << " got: " << temp << "/" << + APICodeToString(temp)); } void read_keys(int expected) @@ -167,7 +168,7 @@ void update_cc_mode() auto control = Control::create(); int ret; RUNNER_ASSERT_MSG(CKM_API_SUCCESS == (ret = control->updateCCMode()), - "Error=" << CKMErrorToString(ret)); + "Error=" << APICodeToString(ret)); } void restart_ckm(const char* const mdpp_setting)