From e8a0fac05b99992f43074296a3e9b71d9215ce87 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Mon, 24 Feb 2014 14:19:17 -0800 Subject: [PATCH] Fix for identity key mismatch on devices with V1 identities. --- .../src/org/whispersystems/textsecure/storage/Session.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/src/org/whispersystems/textsecure/storage/Session.java b/library/src/org/whispersystems/textsecure/storage/Session.java index 24396acdff..b016e211cc 100644 --- a/library/src/org/whispersystems/textsecure/storage/Session.java +++ b/library/src/org/whispersystems/textsecure/storage/Session.java @@ -5,6 +5,7 @@ import android.util.Log; import org.whispersystems.textsecure.crypto.IdentityKey; import org.whispersystems.textsecure.crypto.MasterSecret; +import org.whispersystems.textsecure.crypto.protocol.CiphertextMessage; /** * Helper class for generating key pairs and calculating ECDH agreements. @@ -84,8 +85,7 @@ public class Session { recipient.getRecipientId(), RecipientDevice.DEFAULT_DEVICE_ID)) { - return new SessionRecordV2(context, masterSecret, recipient.getRecipientId(), - RecipientDevice.DEFAULT_DEVICE_ID).getSessionVersion(); + return CiphertextMessage.CURRENT_VERSION; } else if (SessionRecordV1.hasSession(context, recipient)) { return new SessionRecordV1(context, masterSecret, recipient).getSessionVersion(); }