diff options
Diffstat (limited to 'src/eu/siacs/conversations/entities/Account.java')
-rw-r--r-- | src/eu/siacs/conversations/entities/Account.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/entities/Account.java b/src/eu/siacs/conversations/entities/Account.java index 618e4a7c..2ed7ade7 100644 --- a/src/eu/siacs/conversations/entities/Account.java +++ b/src/eu/siacs/conversations/entities/Account.java @@ -138,6 +138,22 @@ public class Account extends AbstractEntity{ return keys; } + public String getSSLFingerprint() { + if (keys.has("ssl_cert")) { + try { + return keys.getString("ssl_cert"); + } catch (JSONException e) { + return null; + } + } else { + return null; + } + } + + public void setSSLCertFingerprint(String fingerprint) { + this.setKey("ssl_cert", fingerprint); + } + public boolean setKey(String keyName, String keyValue) { try { this.keys.put(keyName, keyValue); |