Remove unnecessary classes, up prekey limit to 100

This commit is contained in:
Moxie Marlinspike
2013-11-27 17:50:38 -08:00
parent 1ab4e7e9de
commit 327ee4ff62
11 changed files with 546 additions and 164 deletions

View File

@@ -3,7 +3,6 @@ package org.thoughtcrime.securesms;
import android.content.Intent;
import android.net.Uri;
import org.whispersystems.textsecure.crypto.MasterSecret;
import org.thoughtcrime.securesms.crypto.MasterSecretUtil;
import org.thoughtcrime.securesms.database.DatabaseFactory;
import org.thoughtcrime.securesms.recipients.RecipientFactory;
@@ -11,6 +10,7 @@ import org.thoughtcrime.securesms.recipients.RecipientFormattingException;
import org.thoughtcrime.securesms.recipients.Recipients;
import org.thoughtcrime.securesms.service.ApplicationMigrationService;
import org.thoughtcrime.securesms.util.TextSecurePreferences;
import org.whispersystems.textsecure.crypto.MasterSecret;
public class RoutingActivity extends PassphraseRequiredSherlockActivity {

View File

@@ -89,7 +89,7 @@ public class KeyExchangeProcessorV2 extends KeyExchangeProcessor {
throw new InvalidKeyIdException("No such prekey: " + preKeyId);
PreKeyRecord preKeyRecord = new PreKeyRecord(context, masterSecret, preKeyId);
ECKeyPair ourBaseKey = preKeyRecord.getKeyPair().getKeyPair();
ECKeyPair ourBaseKey = preKeyRecord.getKeyPair();
ECKeyPair ourEphemeralKey = ourBaseKey;
IdentityKeyPair ourIdentityKey = IdentityKeyUtil.getIdentityKeyPair(context, masterSecret, ourBaseKey.getPublicKey().getType());
@@ -113,7 +113,7 @@ public class KeyExchangeProcessorV2 extends KeyExchangeProcessor {
{
ECKeyPair ourBaseKey = Curve.generateKeyPairForSession(2);
ECKeyPair ourEphemeralKey = Curve.generateKeyPairForSession(2);
ECPublicKey theirBaseKey = message.getPublicKey().getPublicKey();
ECPublicKey theirBaseKey = message.getPublicKey();
ECPublicKey theirEphemeralKey = theirBaseKey;
IdentityKey theirIdentityKey = message.getIdentityKey();
IdentityKeyPair ourIdentityKey = IdentityKeyUtil.getIdentityKeyPair(context, masterSecret,