From 6059b964569fb406bbc86a0ccb19e76851fba2b6 Mon Sep 17 00:00:00 2001 From: Andreas Straub Date: Fri, 31 Jul 2015 23:28:09 +0200 Subject: Provide process function for key transport message --- .../crypto/axolotl/XmppAxolotlSession.java | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'src/main/java/eu/siacs/conversations/crypto/axolotl/XmppAxolotlSession.java') diff --git a/src/main/java/eu/siacs/conversations/crypto/axolotl/XmppAxolotlSession.java b/src/main/java/eu/siacs/conversations/crypto/axolotl/XmppAxolotlSession.java index 6ed73da6a..46004a1a9 100644 --- a/src/main/java/eu/siacs/conversations/crypto/axolotl/XmppAxolotlSession.java +++ b/src/main/java/eu/siacs/conversations/crypto/axolotl/XmppAxolotlSession.java @@ -23,16 +23,12 @@ import eu.siacs.conversations.entities.Account; public class XmppAxolotlSession { private final SessionCipher cipher; - private Integer preKeyId = null; private final SQLiteAxolotlStore sqLiteAxolotlStore; - - public AxolotlAddress getRemoteAddress() { - return remoteAddress; - } - private final AxolotlAddress remoteAddress; private final Account account; private String fingerprint = null; + private Integer preKeyId = null; + private boolean fresh = true; public XmppAxolotlSession(Account account, SQLiteAxolotlStore store, AxolotlAddress remoteAddress, String fingerprint) { this(account, store, remoteAddress); @@ -59,6 +55,18 @@ public class XmppAxolotlSession { return fingerprint; } + public AxolotlAddress getRemoteAddress() { + return remoteAddress; + } + + public boolean isFresh() { + return fresh; + } + + public void setNotFresh() { + this.fresh = false; + } + protected void setTrust(SQLiteAxolotlStore.Trust trust) { sqLiteAxolotlStore.setFingerprintTrust(fingerprint, trust); } -- cgit v1.2.3