/*
- * 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.
#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;
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 {
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);
rsa_pub_alias,
Policy(Password(), true),
Policy(Password(), true))),
- "Error=" << CKMErrorToString(temp));
+ "Error=" << APICodeToString(temp));
RUNNER_ASSERT_MSG(
CKM_API_SUCCESS == (temp = manager->createKeyPairECDSA(
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) {
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)
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)