aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorMichael <betheg@bitcloner.org>2015-01-20 18:01:39 +0100
committerMichael <betheg@bitcloner.org>2015-01-20 18:01:39 +0100
commitfa7d748c3f8ec08ec161e6fac48c88279c655b39 (patch)
treea9324080e9b326584c6744f2dd7d11308c999ad0 /src/main
parent32a16137df2020081c6118c58cc58aaab4198e93 (diff)
otr4j: update to 0.22
Diffstat (limited to '')
-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
3 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/crypto/OtrEngine.java b/src/main/java/eu/siacs/conversations/crypto/OtrEngine.java
index 7f7b350c..d5c45465 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 8e99888b..2ee636b5 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 dc292d5b..8b225228 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;