Remove V1 code.

This commit is contained in:
Moxie Marlinspike
2014-04-09 20:02:46 -07:00
parent ca8c950553
commit 1d07ca3e6f
51 changed files with 175 additions and 2048 deletions

View File

@@ -352,9 +352,9 @@ public class PushTransport extends BaseTransport {
CiphertextMessage message = cipher.encrypt(plaintext);
int remoteRegistrationId = cipher.getRemoteRegistrationId();
if (message.getType() == CiphertextMessage.PREKEY_WHISPER_TYPE) {
if (message.getType() == CiphertextMessage.PREKEY_TYPE) {
return new PushBody(IncomingPushMessageSignal.Type.PREKEY_BUNDLE_VALUE, remoteRegistrationId, message.serialize());
} else if (message.getType() == CiphertextMessage.CURRENT_WHISPER_TYPE) {
} else if (message.getType() == CiphertextMessage.WHISPER_TYPE) {
return new PushBody(IncomingPushMessageSignal.Type.CIPHERTEXT_VALUE, remoteRegistrationId, message.serialize());
} else {
throw new AssertionError("Unknown ciphertext type: " + message.getType());

View File

@@ -183,7 +183,7 @@ public class SmsTransport extends BaseTransport {
CiphertextMessage ciphertextMessage = sessionCipher.encrypt(paddedPlaintext);
String encodedCiphertext = new String(transportDetails.getEncodedMessage(ciphertextMessage.serialize()));
if (ciphertextMessage.getType() == CiphertextMessage.PREKEY_WHISPER_TYPE) {
if (ciphertextMessage.getType() == CiphertextMessage.PREKEY_TYPE) {
message = new OutgoingPrekeyBundleMessage(message, encodedCiphertext);
} else {
message = message.withBody(encodedCiphertext);