diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-12-23 17:41:26 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-12-23 17:41:26 +0100 |
commit | d0bad09f13886c7d8ee20c0205293cb0250d9c2f (patch) | |
tree | 97e0ae83303115b051951d3a65775db9e9581705 /src/main/java/eu/siacs/conversations/crypto/axolotl/SQLiteAxolotlStore.java | |
parent | 186757136866a8e3dabec0ab45f3e2995b788991 (diff) |
save certificate when verifying with x509
Diffstat (limited to 'src/main/java/eu/siacs/conversations/crypto/axolotl/SQLiteAxolotlStore.java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/crypto/axolotl/SQLiteAxolotlStore.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/crypto/axolotl/SQLiteAxolotlStore.java b/src/main/java/eu/siacs/conversations/crypto/axolotl/SQLiteAxolotlStore.java index a7831718..788a391d 100644 --- a/src/main/java/eu/siacs/conversations/crypto/axolotl/SQLiteAxolotlStore.java +++ b/src/main/java/eu/siacs/conversations/crypto/axolotl/SQLiteAxolotlStore.java @@ -15,6 +15,7 @@ import org.whispersystems.libaxolotl.state.SessionRecord; import org.whispersystems.libaxolotl.state.SignedPreKeyRecord; import org.whispersystems.libaxolotl.util.KeyHelper; +import java.security.cert.X509Certificate; import java.util.List; import java.util.Set; @@ -36,6 +37,7 @@ public class SQLiteAxolotlStore implements AxolotlStore { public static final String NAME = "name"; public static final String TRUSTED = "trusted"; public static final String OWN = "ownkey"; + public static final String CERTIFICATE = "certificate"; public static final String JSONKEY_REGISTRATION_ID = "axolotl_reg_id"; public static final String JSONKEY_CURRENT_PREKEY_ID = "axolotl_cur_prekey_id"; @@ -213,6 +215,10 @@ public class SQLiteAxolotlStore implements AxolotlStore { trustCache.remove(fingerprint); } + public void setFingerprintCertificate(String fingerprint, X509Certificate x509Certificate) { + mXmppConnectionService.databaseBackend.setIdentityKeyCertificate(account, fingerprint, x509Certificate); + } + public Set<IdentityKey> getContactKeysWithTrust(String bareJid, XmppAxolotlSession.Trust trust) { return mXmppConnectionService.databaseBackend.loadIdentityKeys(account, bareJid, trust); } |