Revert "Add CryptsetupEngine" 76/140276/1
authorsangwan.kwon <sangwan.kwon@samsung.com>
Mon, 24 Jul 2017 08:54:37 +0000 (17:54 +0900)
committersangwan.kwon <sangwan.kwon@samsung.com>
Mon, 24 Jul 2017 08:54:37 +0000 (17:54 +0900)
- Since arch64 build failed, this commit be reverted.

This reverts commit 0ec77b9d13e306ef2846c9ef7de8fd3888878e2b.

Conflicts:
server/engine/encryption/cryptsetup-engine.cpp

Change-Id: I166fcafa9aa24e9d3076ec8f6a39041fb42f7719

packaging/ode.spec
server/CMakeLists.txt
server/engine/encryption/cryptsetup-engine.h [deleted file]

index fe3f58f..75181d7 100755 (executable)
@@ -19,7 +19,6 @@ BuildRequires: pkgconfig(key-manager)
 BuildRequires: pkgconfig(cynara-client)
 BuildRequires: pkgconfig(cynara-session)
 BuildRequires: pkgconfig(openssl)
-BuildRequires: pkgconfig(libcryptsetup)
 
 %description
 The ode package provides a daemon which is responsible for encrypting/decryption storages and secure erasing.
index 7c0ee26..4b781c2 100644 (file)
@@ -29,7 +29,6 @@ SET(SERVER_SRCS       main.cpp
                                engine/encryption/ext4-engine.cpp
                                engine/encryption/dmcrypt-engine.cpp
                                engine/encryption/ecryptfs-engine.cpp
-                               engine/encryption/cryptsetup-engine.cpp
                                engine/erase/mmc-engine.cpp
                                key-manager/key-store.cpp
                                key-manager/key-manager.cpp
@@ -46,7 +45,6 @@ SET(DEPENDENCY        klay
                                cynara-client
                                cynara-session
                                openssl
-                               libcryptsetup
 )
 
 SET(SERVER_NAME ${PROJECT_NAME}d)
diff --git a/server/engine/encryption/cryptsetup-engine.h b/server/engine/encryption/cryptsetup-engine.h
deleted file mode 100644 (file)
index 55c4658..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- *  Copyright (c) 2017 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.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License
- */
-
-#ifndef __CRYPTSETUP_ENGINE_H__
-#define __CRYPTSETUP_ENGINE_H__
-
-#include <string>
-#include <vector>
-
-namespace ode {
-
-class CryptsetupEngine final {
-public:
-       enum class DeviceType {
-               PLAIN,
-               LUKS,
-       };
-
-       CryptsetupEngine(const std::string &devicePath);
-       CryptsetupEngine(const CryptsetupEngine &) = delete;
-       CryptsetupEngine(CryptsetupEngine &&) = delete;
-       ~CryptsetupEngine();
-
-       CryptsetupEngine &operator=(const CryptsetupEngine &) = delete;
-       CryptsetupEngine &operator=(CryptsetupEngine &&) = delete;
-
-       // TODO make it common among engines
-       typedef std::vector<unsigned char> data;
-
-       void format(DeviceType type, const data &key);
-
-       // create new mapping, returns mapping path
-       std::string open(DeviceType type, const std::string &name, const data &key);
-
-       static void close(const std::string &name);
-
-       bool isKeyMetaSet();
-       const data getKeyMeta();
-       void setKeyMeta(const data &data);
-       void clearKeyMeta();
-
-private:
-       std::string devPath;
-};
-
-} // namespace ode
-#endif // __CRYPTSETUP_ENGINE_H__