From 2f64b84838f56818775eba401c26be5908140f7b Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Fri, 25 Mar 2016 10:19:12 -0700 Subject: [PATCH] Fix identity key formatting regression Fixes #5376 // FREEBIE --- src/org/thoughtcrime/securesms/VerifyIdentityActivity.java | 5 +++-- src/org/thoughtcrime/securesms/ViewIdentityActivity.java | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/org/thoughtcrime/securesms/VerifyIdentityActivity.java b/src/org/thoughtcrime/securesms/VerifyIdentityActivity.java index 95b7e5f153..7bc3fe22e0 100644 --- a/src/org/thoughtcrime/securesms/VerifyIdentityActivity.java +++ b/src/org/thoughtcrime/securesms/VerifyIdentityActivity.java @@ -29,6 +29,7 @@ import org.thoughtcrime.securesms.crypto.MasterSecret; import org.thoughtcrime.securesms.crypto.storage.TextSecureSessionStore; import org.thoughtcrime.securesms.recipients.Recipient; import org.thoughtcrime.securesms.recipients.RecipientFactory; +import org.thoughtcrime.securesms.util.Hex; import org.whispersystems.libsignal.SignalProtocolAddress; import org.whispersystems.libsignal.IdentityKey; import org.whispersystems.libsignal.state.SessionRecord; @@ -75,14 +76,14 @@ public class VerifyIdentityActivity extends KeyScanningActivity { return; } - localIdentityFingerprint.setText(IdentityKeyUtil.getIdentityKey(this).getFingerprint()); + localIdentityFingerprint.setText(Hex.toString(IdentityKeyUtil.getIdentityKey(this).serialize())); IdentityKey identityKey = getRemoteIdentityKey(masterSecret, recipient); if (identityKey == null) { remoteIdentityFingerprint.setText(R.string.VerifyIdentityActivity_recipient_has_no_identity_key); } else { - remoteIdentityFingerprint.setText(identityKey.getFingerprint()); + remoteIdentityFingerprint.setText(Hex.toString(identityKey.serialize())); } } diff --git a/src/org/thoughtcrime/securesms/ViewIdentityActivity.java b/src/org/thoughtcrime/securesms/ViewIdentityActivity.java index 210850deff..2020c8dbfa 100644 --- a/src/org/thoughtcrime/securesms/ViewIdentityActivity.java +++ b/src/org/thoughtcrime/securesms/ViewIdentityActivity.java @@ -21,6 +21,7 @@ import android.support.annotation.NonNull; import android.widget.TextView; import org.thoughtcrime.securesms.crypto.MasterSecret; +import org.thoughtcrime.securesms.util.Hex; import org.whispersystems.libsignal.IdentityKey; import org.thoughtcrime.securesms.crypto.IdentityKeyParcelable; @@ -54,7 +55,7 @@ public class ViewIdentityActivity extends KeyScanningActivity { if (identityKey == null) { identityFingerprint.setText(R.string.ViewIdentityActivity_you_do_not_have_an_identity_key); } else { - identityFingerprint.setText(identityKey.getFingerprint()); + identityFingerprint.setText(Hex.toString(identityKey.serialize())); } }