Fix identity key formatting regression

Fixes #5376
// FREEBIE
This commit is contained in:
Moxie Marlinspike 2016-03-25 10:19:12 -07:00
parent df2e39f251
commit 2f64b84838
2 changed files with 5 additions and 3 deletions

View File

@ -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()));
}
}

View File

@ -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()));
}
}