diff options
author | Andreas Straub <andy@strb.org> | 2015-07-20 14:56:41 +0200 |
---|---|---|
committer | Andreas Straub <andy@strb.org> | 2015-07-20 14:56:41 +0200 |
commit | 19a0ae42d667644ee3400c92c53ad0ad093c52fe (patch) | |
tree | 4716f57d55329b87683743f3b6e4fc0bf6e78a50 /src/main/java/eu/siacs/conversations/crypto/axolotl | |
parent | 012f036840ade8f46462eafcc96d1f223f8ba845 (diff) |
Lock TrustKeys if no trusted keys are available
Diffstat (limited to 'src/main/java/eu/siacs/conversations/crypto/axolotl')
-rw-r--r-- | src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java b/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java index 4189aba4..827ea44d 100644 --- a/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java +++ b/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java @@ -281,6 +281,10 @@ public class AxolotlService { return mXmppConnectionService.databaseBackend.loadIdentityKeys(account, bareJid, Trust.UNDECIDED); } + public long getContactNumTrustedKeys(String bareJid) { + return mXmppConnectionService.databaseBackend.numTrustedKeys(account, bareJid); + } + // -------------------------------------- // SessionStore // -------------------------------------- @@ -672,6 +676,10 @@ public class AxolotlService { return axolotlStore.getContactUndecidedKeys(contact.getJid().toBareJid().toString()); } + public long getNumTrustedKeys(Contact contact) { + return axolotlStore.getContactNumTrustedKeys(contact.getJid().toBareJid().toString()); + } + private AxolotlAddress getAddressForJid(Jid jid) { return new AxolotlAddress(jid.toString(), 0); } |