diff options
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/crypto/OtrEngine.java | 9 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/crypto/sasl/Plain.java | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/eu/siacs/conversations/crypto/OtrEngine.java b/src/main/java/eu/siacs/conversations/crypto/OtrEngine.java index 642d0ed0..7f7b350c 100644 --- a/src/main/java/eu/siacs/conversations/crypto/OtrEngine.java +++ b/src/main/java/eu/siacs/conversations/crypto/OtrEngine.java @@ -34,7 +34,7 @@ import net.java.otr4j.crypto.OtrCryptoException; import net.java.otr4j.session.InstanceTag; import net.java.otr4j.session.SessionID; -public class OtrEngine implements OtrEngineHost { +public class OtrEngine extends OtrCryptoEngineImpl implements OtrEngineHost { private Account account; private OtrPolicy otrPolicy; @@ -126,7 +126,7 @@ public class OtrEngine implements OtrEngineHost { @Override public byte[] getLocalFingerprintRaw(SessionID arg0) { try { - return new OtrCryptoEngineImpl().getFingerprintRaw(getPublicKey()); + return getFingerprintRaw(getPublicKey()); } catch (OtrCryptoException e) { return null; } @@ -180,6 +180,7 @@ public class OtrEngine implements OtrEngineHost { packet.setBody(body); packet.addChild("private", "urn:xmpp:carbons:2"); packet.addChild("no-copy", "urn:xmpp:hints"); + packet.addChild("no-store", "urn:xmpp:hints"); packet.setType(MessagePacket.TYPE_CHAT); account.getXmppConnection().sendMessagePacket(packet); } @@ -257,10 +258,10 @@ public class OtrEngine implements OtrEngineHost { Conversation conversation = this.mXmppConnectionService.find(this.account,jid); if (conversation!=null) { if (approved) { - conversation.getContact().addOtrFingerprint(CryptoHelper.prettifyFingerprint(fingerprint)); + conversation.getContact().addOtrFingerprint(fingerprint); } conversation.smp().hint = null; - conversation.smp().status = Conversation.Smp.STATUS_FINISHED; + conversation.smp().status = Conversation.Smp.STATUS_VERIFIED; mXmppConnectionService.updateConversationUi(); mXmppConnectionService.syncRosterToDisk(conversation.getAccount()); } diff --git a/src/main/java/eu/siacs/conversations/crypto/sasl/Plain.java b/src/main/java/eu/siacs/conversations/crypto/sasl/Plain.java index c7dedc5e..40a55151 100644 --- a/src/main/java/eu/siacs/conversations/crypto/sasl/Plain.java +++ b/src/main/java/eu/siacs/conversations/crypto/sasl/Plain.java @@ -14,7 +14,7 @@ public class Plain extends SaslMechanism { @Override public int getPriority() { - return 0; + return 10; } @Override |