aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/entities/Account.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-03-14 21:36:38 +0100
committerDaniel Gultsch <daniel@gultsch.de>2014-03-14 21:36:38 +0100
commit4e4a767743a62d1f88814e5cf024bf983772df2c (patch)
treef31d328a9df9f45d5838849631ea97f82f1c4490 /src/eu/siacs/conversations/entities/Account.java
parentbae741875690400efac68ed49f2ead405ec2ed53 (diff)
added display of own fingerprint
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/entities/Account.java8
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 d9a3ef03..41d94fee 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();
+ }
}