aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-01-21 11:48:42 +0100
committerDaniel Gultsch <daniel@gultsch.de>2015-01-21 11:48:42 +0100
commit818c0e609cb822cb67af1b0ec9166ef4d6eca29c (patch)
tree1feb856a90a6e4820ffeae985887a47440c421c7
parent7df6ae9ef88428c367f882433cf77b589e8e4c1e (diff)
parentfa7d748c3f8ec08ec161e6fac48c88279c655b39 (diff)
Merge pull request #908 from betheg/otr4j
otr4j: update to 0.22
-rw-r--r--build.gradle2
-rw-r--r--src/main/java/eu/siacs/conversations/crypto/OtrEngine.java6
-rw-r--r--src/main/java/eu/siacs/conversations/generator/MessageGenerator.java2
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java2
4 files changed, 9 insertions, 3 deletions
diff --git a/build.gradle b/build.gradle
index b4d0648ab..af956b41d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -32,7 +32,7 @@ dependencies {
compile project(':libs:MemorizingTrustManager')
compile 'com.android.support:support-v13:21.0.3'
compile 'org.bouncycastle:bcprov-jdk15on:1.50'
- compile 'net.java:otr4j:0.21'
+ compile 'net.java:otr4j:0.22'
compile 'org.gnu.inet:libidn:1.15'
compile 'com.google.zxing:core:3.1.0'
compile 'com.google.zxing:android-integration:3.1.0'
diff --git a/src/main/java/eu/siacs/conversations/crypto/OtrEngine.java b/src/main/java/eu/siacs/conversations/crypto/OtrEngine.java
index 7f7b350c6..d5c454655 100644
--- a/src/main/java/eu/siacs/conversations/crypto/OtrEngine.java
+++ b/src/main/java/eu/siacs/conversations/crypto/OtrEngine.java
@@ -33,6 +33,7 @@ import net.java.otr4j.crypto.OtrCryptoEngineImpl;
import net.java.otr4j.crypto.OtrCryptoException;
import net.java.otr4j.session.InstanceTag;
import net.java.otr4j.session.SessionID;
+import net.java.otr4j.session.FragmenterInstructions;
public class OtrEngine extends OtrCryptoEngineImpl implements OtrEngineHost {
@@ -269,4 +270,9 @@ public class OtrEngine extends OtrCryptoEngineImpl implements OtrEngineHost {
}
}
+ @Override
+ public FragmenterInstructions getFragmenterInstructions(SessionID sessionID) {
+ return null;
+ }
+
}
diff --git a/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java b/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java
index 8e99888b5..2ee636b50 100644
--- a/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java
+++ b/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java
@@ -68,7 +68,7 @@ public class MessageGenerator extends AbstractGenerator {
packet.addChild("private", "urn:xmpp:carbons:2");
packet.addChild("no-copy", "urn:xmpp:hints");
try {
- packet.setBody(otrSession.transformSending(message.getBody()));
+ packet.setBody(otrSession.transformSending(message.getBody())[0]);
return packet;
} catch (OtrException e) {
return null;
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index dc292d5b7..8b2252284 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -1688,7 +1688,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
try {
packet.setBody(otrSession
.transformSending(CryptoHelper.FILETRANSFER
- + CryptoHelper.bytesToHex(symmetricKey)));
+ + CryptoHelper.bytesToHex(symmetricKey))[0]);
sendMessagePacket(account, packet);
conversation.setSymmetricKey(symmetricKey);
return true;