aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/crypto
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2016-11-18 22:38:07 +0100
committerChristian Schneppe <christian@pix-art.de>2016-11-18 22:38:07 +0100
commit54f1422d3d076b7e96cf2c03c61cf75affaf43e7 (patch)
treea6870ebc71ed2987cf55625fa895dcbdf66912e7 /src/main/java/de/pixart/messenger/crypto
parentd9659fc3667cff043c922c5132f52bd5defc36fe (diff)
put omemo fingerprint in own uri (qr code / nfc)
Diffstat (limited to 'src/main/java/de/pixart/messenger/crypto')
-rw-r--r--src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java6
-rw-r--r--src/main/java/de/pixart/messenger/crypto/axolotl/XmppAxolotlSession.java2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java b/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java
index 807ede503..532fbe470 100644
--- a/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java
+++ b/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java
@@ -102,6 +102,10 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded {
axolotlStore.preVerifyFingerprint(contact.getAccount(), contact.getJid().toBareJid().toPreppedString(), fingerprint);
}
+ public void preVerifyFingerprint(Account account, String fingerprint) {
+ axolotlStore.preVerifyFingerprint(account, account.getJid().toBareJid().toPreppedString(), fingerprint);
+ }
+
private static class AxolotlAddressMap<T> {
protected Map<String, Map<Integer, T>> map;
protected final Object MAP_LOCK = new Object();
@@ -293,7 +297,7 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded {
return new AxolotlAddress(jid.toPreppedString(), 0);
}
- private Set<XmppAxolotlSession> findOwnSessions() {
+ public Set<XmppAxolotlSession> findOwnSessions() {
AxolotlAddress ownAddress = getAddressForJid(account.getJid().toBareJid());
return new HashSet<>(this.sessions.getAll(ownAddress).values());
}
diff --git a/src/main/java/de/pixart/messenger/crypto/axolotl/XmppAxolotlSession.java b/src/main/java/de/pixart/messenger/crypto/axolotl/XmppAxolotlSession.java
index c71ad92a9..566afef9a 100644
--- a/src/main/java/de/pixart/messenger/crypto/axolotl/XmppAxolotlSession.java
+++ b/src/main/java/de/pixart/messenger/crypto/axolotl/XmppAxolotlSession.java
@@ -76,7 +76,7 @@ public class XmppAxolotlSession {
sqLiteAxolotlStore.setFingerprintStatus(getFingerprint(), status);
}
- protected FingerprintStatus getTrust() {
+ public FingerprintStatus getTrust() {
FingerprintStatus status = sqLiteAxolotlStore.getFingerprintStatus(getFingerprint());
return (status == null) ? FingerprintStatus.createActiveUndecided() : status;
}