aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java
diff options
context:
space:
mode:
authorAndreas Straub <andy@strb.org>2015-07-19 14:17:25 +0200
committerAndreas Straub <andy@strb.org>2015-07-19 22:24:05 +0200
commitec0aff4ed7982cc6db43cb6337f828f732429fd2 (patch)
treeecb63848420e124dd38826a5418583cad5d49bba /src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java
parent6f67469bda0ffe97cb8cd8d400affed5a17c34c5 (diff)
Encrypt files for HTTP upload in encrypted chats
Diffstat (limited to 'src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java')
-rw-r--r--src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java b/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java
index a3ab8dab..c0d4455a 100644
--- a/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java
+++ b/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java
@@ -88,7 +88,9 @@ public class HttpUploadConnection implements Transferable {
this.file = mXmppConnectionService.getFileBackend().getFile(message, false);
this.file.setExpectedSize(this.file.getSize());
- if (Config.ENCRYPT_ON_HTTP_UPLOADED) {
+ if (Config.ENCRYPT_ON_HTTP_UPLOADED
+ || message.getEncryption() == Message.ENCRYPTION_AXOLOTL
+ || message.getEncryption() == Message.ENCRYPTION_OTR) {
this.key = new byte[48];
mXmppConnectionService.getRNG().nextBytes(this.key);
this.file.setKey(this.key);