We need to force plaintext on key exchange messages.

This commit is contained in:
Moxie Marlinspike 2012-10-29 20:53:04 -07:00
parent c5ed820590
commit 93c0fffc31
2 changed files with 33 additions and 33 deletions

View File

@ -58,7 +58,7 @@ public class KeyExchangeInitiator {
LinkedList<Recipient> list = new LinkedList<Recipient>();
list.add(recipient);
MessageSender.send(context, masterSecret, new Recipients(list), -1, message.serialize(), false);
MessageSender.send(context, masterSecret, new Recipients(list), -1, message.serialize(), true);
}
private static boolean hasInitiatedSession(Context context, MasterSecret masterSecret, Recipient recipient) {

View File

@ -16,8 +16,9 @@
*/
package org.thoughtcrime.securesms.crypto;
import java.util.LinkedList;
import java.util.List;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import org.bouncycastle.util.Arrays;
import org.thoughtcrime.securesms.database.LocalKeyRecord;
@ -30,9 +31,8 @@ import org.thoughtcrime.securesms.service.KeyCachingService;
import org.thoughtcrime.securesms.sms.MessageSender;
import org.thoughtcrime.securesms.util.Conversions;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import java.util.LinkedList;
import java.util.List;
/**
* This class processes key exchange interactions.
@ -110,7 +110,7 @@ public class KeyExchangeProcessor {
KeyExchangeMessage ourMessage = new KeyExchangeMessage(context, masterSecret, Math.min(Message.SUPPORTED_VERSION, message.getMaxVersion()), localKeyRecord, initiateKeyId);
Log.w("KeyExchangeProcessor", "Responding with key exchange message fingerprint: " + ourMessage.getPublicKey().getFingerprint());
Log.w("KeyExchangeProcessor", "Which has a local key record fingerprint: " + localKeyRecord.getCurrentKeyPair().getPublicKey().getFingerprint());
MessageSender.send(context, masterSecret, new Recipients(recipients), threadId, ourMessage.serialize(), false);
MessageSender.send(context, masterSecret, new Recipients(recipients), threadId, ourMessage.serialize(), true);
}
remoteKeyRecord.setCurrentRemoteKey(message.getPublicKey());