diff options
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/entities/Account.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/entities/Account.java b/src/eu/siacs/conversations/entities/Account.java index d9a3ef03b..41d94fee9 100644 --- a/src/eu/siacs/conversations/entities/Account.java +++ b/src/eu/siacs/conversations/entities/Account.java @@ -217,6 +217,9 @@ public class Account extends AbstractEntity{ if (this.otrFingerprint == null) { try { DSAPublicKey pubkey = (DSAPublicKey) this.otrEngine.getPublicKey(); + if (pubkey == null) { + return null; + } StringBuilder builder = new StringBuilder(new OtrCryptoEngineImpl().getFingerprint(pubkey)); builder.insert(8, " "); builder.insert(17, " "); @@ -241,4 +244,9 @@ public class Account extends AbstractEntity{ public void setRosterVersion(String version) { this.rosterVersion = version; } + + public String getOtrFingerprint(Context applicationContext) { + this.getOtrEngine(applicationContext); + return this.getOtrFingerprint(); + } } |