${TARGET_DPL_EFL}
)
-TARGET_LINK_LIBRARIES(${TARGET_DPL_ENCRYPTION} -L./libs -lcal)
+TARGET_LINK_LIBRARIES(${TARGET_DPL_ENCRYPTION} "-ldukgenerator" )
+TARGET_LINK_LIBRARIES(${TARGET_DPL_ENCRYPTION} "-lcryptsvc" )
# Target library properties
SET_TARGET_PROPERTIES(${TARGET_DPL_ENCRYPTION} PROPERTIES
#include <string>
#include <dpl/log/log.h>
#include <dpl/exception.h>
+#include <dukgen.h>
namespace {
#define BITS_SIZE 128
return;
}
- char **duk = calculate(const_cast<char*>(userKey.c_str()),
- userKey.size(), KEY_SIZE);
- unsigned char *key = reinterpret_cast<unsigned char*>(*duk);
+ char* pKey = GetDeviceUniqueKey(const_cast<char*>(userKey.c_str()),
+ userKey.size(), KEY_SIZE);
+
+ unsigned char *key = reinterpret_cast<unsigned char*>(pKey);
if (0 > AES_set_decrypt_key(key, BITS_SIZE, &m_decKey)) {
ThrowMsg(ResourceDecryptor::Exception::GetDecKeyFailed,
#include <fcntl.h>
#include <dpl/log/log.h>
+#include <dukgen.h>
namespace {
#define BITS_SIZE 128
return;
}
- char **duk = calculate(const_cast<char*>(userKey.c_str()),
- userKey.size(), KEY_SIZE);
- unsigned char *key = reinterpret_cast<unsigned char*>(*duk);
+ char* pKey = GetDeviceUniqueKey(const_cast<char*>(userKey.c_str()),
+ userKey.size(), KEY_SIZE);
+ unsigned char *key = reinterpret_cast<unsigned char*>(pKey);
if (0 > AES_set_encrypt_key(key, BITS_SIZE, &m_encKey)) {
ThrowMsg(ResourceEncryptor::Exception::CreateEncKeyFailed,
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(libiri)
BuildRequires: pkgconfig(libidn)
+BuildRequires: libcryptsvc-devel
+BuildRequires: dukgenerator
+Requires: libcryptsvc
%description
Wrt common library
%build
-%ifarch %{ix86}
-cp build/encryption/libs/libcal.i586.a build/encryption/libs/libcal.a
-%else
-cp build/encryption/libs/libcal.arm.a build/encryption/libs/libcal.a
-%endif
-
export LDFLAGS+="-Wl,--rpath=%{_libdir} -Wl,--hash-style=both -Wl,--as-needed"
cmake . -DVERSION=%{version} \