aboutsummaryrefslogtreecommitdiffstats
path: root/net-im/ring-daemon/files/patch-src_archiver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'net-im/ring-daemon/files/patch-src_archiver.cpp')
-rw-r--r--net-im/ring-daemon/files/patch-src_archiver.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/net-im/ring-daemon/files/patch-src_archiver.cpp b/net-im/ring-daemon/files/patch-src_archiver.cpp
new file mode 100644
index 00000000000..a9bcb9a1dab
--- /dev/null
+++ b/net-im/ring-daemon/files/patch-src_archiver.cpp
@@ -0,0 +1,22 @@
+--- src/archiver.cpp.orig 2016-05-10 20:45:50 UTC
++++ src/archiver.cpp
+@@ -97,7 +97,8 @@ Archiver::exportAccounts(std::vector<std
+ }
+
+ // Encrypt using provided password
+- auto encrypted = dht::crypto::aesEncrypt(compressed, password);
++ dht::Blob blob; for (auto c : password) blob.push_back(c);
++ auto encrypted = dht::crypto::aesEncrypt(compressed, blob);
+
+ // Write
+ try {
+@@ -151,7 +152,8 @@ Archiver::importAccounts(std::string arc
+
+ // Decrypt
+ try {
+- file = dht::crypto::aesDecrypt(file, password);
++ dht::Blob blob; for (auto c : password) blob.push_back(c);
++ file = dht::crypto::aesDecrypt(file, blob);
+ } catch (const std::exception& ex) {
+ RING_ERR("Decryption failed: %s", ex.what());
+ return EPERM;