summaryrefslogtreecommitdiff
path: root/src/manager/crypto/sw-backend/store.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/manager/crypto/sw-backend/store.cpp')
-rw-r--r--src/manager/crypto/sw-backend/store.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/manager/crypto/sw-backend/store.cpp b/src/manager/crypto/sw-backend/store.cpp
index b4fd718..0f27005 100644
--- a/src/manager/crypto/sw-backend/store.cpp
+++ b/src/manager/crypto/sw-backend/store.cpp
@@ -28,7 +28,6 @@
#include <sw-backend/obj.h>
#include <sw-backend/store.h>
#include <sw-backend/internals.h>
-#include <SWKeyFile.h>
#include <dpl/log/log.h>
#include <message-buffer.h>
@@ -152,31 +151,9 @@ RawBuffer pack(const RawBuffer &data, const Password &pass)
} // namespace anonymous
-namespace {
-const char *const DEVICE_KEY_XSD = RO_DATA_DIR "/sw_key.xsd";
-const char *const DEVICE_KEY_SW_FILE = RW_DATA_DIR "/device_key.xml";
-}
-
Store::Store(CryptoBackend backendId)
: GStore(backendId)
{
- // get the device key if present
- InitialValues::SWKeyFile keyFile(DEVICE_KEY_SW_FILE);
- int rc = keyFile.Validate(DEVICE_KEY_XSD);
-
- if (rc == XML::Parser::PARSE_SUCCESS) {
- rc = keyFile.Parse();
-
- if (rc == XML::Parser::PARSE_SUCCESS)
- m_deviceKey = keyFile.getPrivKey();
- else
- // do nothing, bypass encrypted elements
- LogWarning("invalid SW key file: " << DEVICE_KEY_SW_FILE << ", parsing code: "
- << rc);
- } else {
- LogWarning("invalid SW key file: " << DEVICE_KEY_SW_FILE <<
- ", validation code: " << rc);
- }
}
GObjUPtr Store::getObject(const Token &token, const Password &pass)