projects
/
platform
/
core
/
test
/
security-tests.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Generic solution for onlycap issues
[platform/core/test/security-tests.git]
/
src
/
ckm
/
privileged
/
cc-mode.cpp
diff --git
a/src/ckm/privileged/cc-mode.cpp
b/src/ckm/privileged/cc-mode.cpp
index
b2b29db
..
eeddb27
100644
(file)
--- a/
src/ckm/privileged/cc-mode.cpp
+++ b/
src/ckm/privileged/cc-mode.cpp
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 2000 - 201
4
Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2000 - 201
9
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.
*
* 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 <ckm-common.h>
#include <ckm/ckm-manager.h>
#include <ckm/ckm-control.h>
#include <ckm-common.h>
#include <ckm/ckm-manager.h>
#include <ckm/ckm-control.h>
+#include <scoped_process_label.h>
using namespace CKM;
using namespace std;
using namespace CKM;
using namespace std;
@@
-73,13
+74,13
@@
private:
MdppState::MdppState()
{
MdppState::MdppState()
{
- Scoped
Label s
l(USER_LABEL);
+ Scoped
ProcessLabel sp
l(USER_LABEL);
m_original = vconf_get_str(VCONFKEY_SECURITY_MDPP_STATE);
}
MdppState::~MdppState()
{
m_original = vconf_get_str(VCONFKEY_SECURITY_MDPP_STATE);
}
MdppState::~MdppState()
{
- Scoped
Label s
l(USER_LABEL);
+ Scoped
ProcessLabel sp
l(USER_LABEL);
if (!m_original)
vconf_set_str(VCONFKEY_SECURITY_MDPP_STATE, UNSET);
else {
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)
{
void MdppState::set(const char* const value)
{
- Scoped
Label s
l(USER_LABEL);
+ Scoped
ProcessLabel sp
l(USER_LABEL);
if (value)
{
int ret = vconf_set_str(VCONFKEY_SECURITY_MDPP_STATE, value);
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))),
rsa_pub_alias,
Policy(Password(), true),
Policy(Password(), true))),
- "Error=" <<
CKMError
ToString(temp));
+ "Error=" <<
APICode
ToString(temp));
RUNNER_ASSERT_MSG(
CKM_API_SUCCESS == (temp = manager->createKeyPairECDSA(
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))),
ecdsa_pub_alias,
Policy(Password(), true),
Policy(Password(), true))),
- "Error=" <<
CKMError
ToString(temp));
+ "Error=" <<
APICode
ToString(temp));
RUNNER_ASSERT_MSG(
CKM_API_SUCCESS == (temp = manager->createKeyAES(
aes_length,
aes_alias,
Policy(Password(), true))),
RUNNER_ASSERT_MSG(
CKM_API_SUCCESS == (temp = manager->createKeyAES(
aes_length,
aes_alias,
Policy(Password(), true))),
- "Error=" <<
CKMError
ToString(temp));
+ "Error=" <<
APICode
ToString(temp));
}
void read_key(ManagerShPtr& manager, const Alias& alias, int expected) {
}
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)),
int temp;
RUNNER_ASSERT_MSG(
expected == (temp = manager->getKey(alias, Password(), key)),
- "Expected: " << expected << "/" <<
CKMError
ToString(expected) << " got: " << temp << "/" <<
-
CKMError
ToString(temp));
+ "Expected: " << expected << "/" <<
APICode
ToString(expected) << " got: " << temp << "/" <<
+
APICode
ToString(temp));
}
void read_keys(int expected)
}
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()),
auto control = Control::create();
int ret;
RUNNER_ASSERT_MSG(CKM_API_SUCCESS == (ret = control->updateCCMode()),
- "Error=" <<
CKMError
ToString(ret));
+ "Error=" <<
APICode
ToString(ret));
}
void restart_ckm(const char* const mdpp_setting)
}
void restart_ckm(const char* const mdpp_setting)