aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.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/HttpDownloadConnection.java
parent6f67469bda0ffe97cb8cd8d400affed5a17c34c5 (diff)
Encrypt files for HTTP upload in encrypted chats
Diffstat (limited to 'src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java')
-rw-r--r--src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java b/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java
index 62fe4191..a9c106ab 100644
--- a/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java
+++ b/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java
@@ -70,7 +70,8 @@ public class HttpDownloadConnection implements Transferable {
String secondToLast = parts.length >= 2 ? parts[parts.length -2] : null;
if ("pgp".equals(lastPart) || "gpg".equals(lastPart)) {
this.message.setEncryption(Message.ENCRYPTION_PGP);
- } else if (message.getEncryption() != Message.ENCRYPTION_OTR) {
+ } else if (message.getEncryption() != Message.ENCRYPTION_OTR
+ && message.getEncryption() != Message.ENCRYPTION_AXOLOTL) {
this.message.setEncryption(Message.ENCRYPTION_NONE);
}
String extension;
@@ -86,7 +87,8 @@ public class HttpDownloadConnection implements Transferable {
this.file.setKey(CryptoHelper.hexToBytes(reference));
}
- if (this.message.getEncryption() == Message.ENCRYPTION_OTR
+ if ((this.message.getEncryption() == Message.ENCRYPTION_OTR
+ || this.message.getEncryption() == Message.ENCRYPTION_AXOLOTL)
&& this.file.getKey() == null) {
this.message.setEncryption(Message.ENCRYPTION_NONE);
}