diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-11-20 10:26:10 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-11-20 10:26:10 +0100 |
commit | 99a9148f594fb106b8ffb6b4283c27636087307f (patch) | |
tree | d023078a5a32bd775fa70f413a7896b4418536e8 /src/main/java/de/pixart/messenger | |
parent | 5f92f208017cbfd52fcf1fce08de865983ab8a12 (diff) |
use lower case otr fingerprints for comparison
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r-- | src/main/java/de/pixart/messenger/entities/Contact.java | 2 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/entities/Conversation.java | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Contact.java b/src/main/java/de/pixart/messenger/entities/Contact.java index 06f7ea4d0..1124b19e1 100644 --- a/src/main/java/de/pixart/messenger/entities/Contact.java +++ b/src/main/java/de/pixart/messenger/entities/Contact.java @@ -301,7 +301,7 @@ public class Contact implements ListItem, Blockable { for (int i = 0; i < prints.length(); ++i) { final String print = prints.isNull(i) ? null : prints.getString(i); if (print != null && !print.isEmpty()) { - fingerprints.add(prints.getString(i)); + fingerprints.add(prints.getString(i).toLowerCase(Locale.US)); } } } diff --git a/src/main/java/de/pixart/messenger/entities/Conversation.java b/src/main/java/de/pixart/messenger/entities/Conversation.java index f9932f67d..36f5c46f6 100644 --- a/src/main/java/de/pixart/messenger/entities/Conversation.java +++ b/src/main/java/de/pixart/messenger/entities/Conversation.java @@ -20,6 +20,7 @@ import java.util.Collections; import java.util.Comparator; import java.util.Iterator; import java.util.List; +import java.util.Locale; import de.pixart.messenger.Config; import de.pixart.messenger.crypto.PgpDecryptionService; @@ -639,7 +640,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl return null; } DSAPublicKey remotePubKey = (DSAPublicKey) getOtrSession().getRemotePublicKey(); - this.otrFingerprint = getAccount().getOtrService().getFingerprint(remotePubKey); + this.otrFingerprint = getAccount().getOtrService().getFingerprint(remotePubKey).toLowerCase(Locale.US); } catch (final OtrCryptoException | UnsupportedOperationException ignored) { return null; } |