diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2014-03-07 14:24:33 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2014-03-07 14:24:33 +0100 |
commit | 3bb5fcb3ca3586f2c641e0810ba0e019604ad7e4 (patch) | |
tree | 343b247e9a746cca31ed9c358bca2adf6fda309d /src/eu/siacs/conversations/entities/Account.java | |
parent | 1cf05fccdb0823a99e0ea33cc51150c7e31f2f1e (diff) |
tls exceptions for untrusted certs
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); |