diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-11-24 21:42:35 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-11-24 21:42:35 +0100 |
commit | fefae63f1dceef88c42a2c80ce7265419095316f (patch) | |
tree | 304098147b44995538ff9ca6cb7d46c6825254ed /src/main/java/de/pixart/messenger/crypto/axolotl/SQLiteAxolotlStore.java | |
parent | 02ff5375371d5178c6e0bb099d2a962488c1ef4a (diff) |
introduced blind trust before verification mode
read more about the concept on https://gultsch.de/trust.html
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/crypto/axolotl/SQLiteAxolotlStore.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/crypto/axolotl/SQLiteAxolotlStore.java b/src/main/java/de/pixart/messenger/crypto/axolotl/SQLiteAxolotlStore.java index 0d246795d..ed944b45a 100644 --- a/src/main/java/de/pixart/messenger/crypto/axolotl/SQLiteAxolotlStore.java +++ b/src/main/java/de/pixart/messenger/crypto/axolotl/SQLiteAxolotlStore.java @@ -191,7 +191,12 @@ public class SQLiteAxolotlStore implements AxolotlStore { String fingerprint = identityKey.getFingerprint().replaceAll("\\s", ""); FingerprintStatus status = getFingerprintStatus(fingerprint); if (status == null) { - status = FingerprintStatus.createActiveUndecided(); //default for new keys + if (mXmppConnectionService.blindTrustBeforeVerification() && !account.getAxolotlService().hasVerifiedKeys(name)) { + Log.d(Config.LOGTAG,account.getJid().toBareJid()+": blindly trusted "+fingerprint+" of "+name); + status = FingerprintStatus.createActiveTrusted(); + } else { + status = FingerprintStatus.createActiveUndecided(); + } } else { status = status.toActive(); } |