Update to protobuf 3.10 lite.
Update fingerprint logic. Update for additional validation around SignalServiceAddresses. Co-authored-by: Greyson Parrelli <greyson@signal.org>
This commit is contained in:
parent
2ab8db33e3
commit
a1b10b3222
11 changed files with 75 additions and 7594 deletions
21
build.gradle
21
build.gradle
|
@ -17,10 +17,12 @@ buildscript {
|
|||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.5.1'
|
||||
classpath 'androidx.navigation:navigation-safe-args-gradle-plugin:2.1.0'
|
||||
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.10'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'com.google.protobuf'
|
||||
apply plugin: 'androidx.navigation.safeargs'
|
||||
apply plugin: 'witness'
|
||||
apply from: 'translations.gradle'
|
||||
|
@ -58,10 +60,26 @@ repositories {
|
|||
}
|
||||
}
|
||||
google()
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
mavenLocal()
|
||||
}
|
||||
|
||||
protobuf {
|
||||
protoc {
|
||||
artifact = 'com.google.protobuf:protoc:3.10.0'
|
||||
}
|
||||
generateProtoTasks {
|
||||
all().each { task ->
|
||||
task.builtins {
|
||||
java {
|
||||
option "lite"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0-beta01'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.0.0'
|
||||
|
@ -97,7 +115,7 @@ dependencies {
|
|||
implementation 'org.conscrypt:conscrypt-android:2.0.0'
|
||||
implementation 'org.signal:aesgcmprovider:0.0.3'
|
||||
|
||||
implementation 'org.whispersystems:signal-service-android:2.14.0'
|
||||
implementation 'org.whispersystems:signal-service-android:2.15.0'
|
||||
|
||||
implementation 'org.signal:ringrtc-android:0.1.9'
|
||||
|
||||
|
@ -330,6 +348,7 @@ android {
|
|||
res.srcDirs = ['res']
|
||||
assets.srcDirs = ['assets']
|
||||
jniLibs.srcDirs = ['libs']
|
||||
proto.srcDir 'protobuf'
|
||||
}
|
||||
androidTest {
|
||||
java.srcDirs = ['test/androidTest/java']
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
* Licensed according to the LICENSE file in this repository.
|
||||
*/
|
||||
|
||||
syntax = "proto2";
|
||||
|
||||
package signal;
|
||||
|
||||
option java_package = "org.thoughtcrime.securesms.backup";
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
*
|
||||
* Licensed according to the LICENSE file in this repository.
|
||||
*/
|
||||
|
||||
syntax = "proto2";
|
||||
|
||||
package signalservice;
|
||||
|
||||
option java_package = "org.thoughtcrime.securesms.devicelist";
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
|
||||
all:
|
||||
protoc --java_out=../src/ Backups.proto DeviceName.proto
|
|
@ -29,6 +29,7 @@ import org.thoughtcrime.securesms.util.Base64;
|
|||
import org.thoughtcrime.securesms.util.FeatureFlags;
|
||||
import org.thoughtcrime.securesms.util.VerifySpan;
|
||||
import org.whispersystems.libsignal.SignalProtocolAddress;
|
||||
import org.whispersystems.libsignal.util.guava.Optional;
|
||||
import org.whispersystems.signalservice.api.messages.SignalServiceEnvelope;
|
||||
import org.whispersystems.signalservice.internal.push.SignalServiceProtos;
|
||||
|
||||
|
@ -169,7 +170,7 @@ public class ConfirmIdentityDialog extends AlertDialog {
|
|||
boolean legacy = !messageRecord.isContentBundleKeyExchange();
|
||||
|
||||
SignalServiceEnvelope envelope = new SignalServiceEnvelope(SignalServiceProtos.Envelope.Type.PREKEY_BUNDLE_VALUE,
|
||||
RecipientUtil.toSignalServiceAddress(getContext(), messageRecord.getIndividualRecipient()),
|
||||
Optional.of(RecipientUtil.toSignalServiceAddress(getContext(), messageRecord.getIndividualRecipient())),
|
||||
messageRecord.getRecipientDeviceId(),
|
||||
messageRecord.getDateSent(),
|
||||
legacy ? Base64.decode(messageRecord.getBody()) : null,
|
||||
|
|
|
@ -79,6 +79,7 @@ import org.thoughtcrime.securesms.recipients.RecipientId;
|
|||
import org.thoughtcrime.securesms.util.DynamicDarkActionBarTheme;
|
||||
import org.thoughtcrime.securesms.util.DynamicLanguage;
|
||||
import org.thoughtcrime.securesms.util.DynamicTheme;
|
||||
import org.thoughtcrime.securesms.util.FeatureFlags;
|
||||
import org.thoughtcrime.securesms.util.IdentityUtil;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
import org.thoughtcrime.securesms.util.Util;
|
||||
|
@ -88,6 +89,7 @@ import org.whispersystems.libsignal.fingerprint.Fingerprint;
|
|||
import org.whispersystems.libsignal.fingerprint.FingerprintParsingException;
|
||||
import org.whispersystems.libsignal.fingerprint.FingerprintVersionMismatchException;
|
||||
import org.whispersystems.libsignal.fingerprint.NumericFingerprintGenerator;
|
||||
import org.whispersystems.signalservice.api.util.UuidUtil;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.nio.charset.Charset;
|
||||
|
@ -205,12 +207,8 @@ public class VerifyIdentityActivity extends PassphraseRequiredActionBarActivity
|
|||
public static final String VERIFIED_STATE = "verified_state";
|
||||
|
||||
private LiveRecipient recipient;
|
||||
private String localNumber;
|
||||
private String remoteNumber;
|
||||
|
||||
private IdentityKey localIdentity;
|
||||
private IdentityKey remoteIdentity;
|
||||
|
||||
private Fingerprint fingerprint;
|
||||
|
||||
private View container;
|
||||
|
@ -269,14 +267,24 @@ public class VerifyIdentityActivity extends PassphraseRequiredActionBarActivity
|
|||
if (localIdentityParcelable == null) throw new AssertionError("local identity required");
|
||||
if (remoteIdentityParcelable == null) throw new AssertionError("remote identity required");
|
||||
|
||||
this.localNumber = TextSecurePreferences.getLocalNumber(requireContext());
|
||||
this.localIdentity = localIdentityParcelable.get();
|
||||
this.recipient = Recipient.live(recipientId);
|
||||
this.remoteNumber = recipient.resolve().getE164().or("");
|
||||
this.remoteIdentity = remoteIdentityParcelable.get();
|
||||
|
||||
if (TextUtils.isEmpty(remoteNumber)) {
|
||||
Log.w(TAG, "Empty remote number! Did we get a UUID-only message somehow?");
|
||||
int version;
|
||||
byte[] localId;
|
||||
byte[] remoteId;
|
||||
|
||||
if (FeatureFlags.UUIDS && recipient.resolve().getUuid().isPresent()) {
|
||||
Log.i(TAG, "Using UUID (version 2).");
|
||||
version = 2;
|
||||
localId = UuidUtil.toByteArray(TextSecurePreferences.getLocalUuid(requireContext()));
|
||||
remoteId = UuidUtil.toByteArray(recipient.resolve().getUuid().get());
|
||||
} else {
|
||||
Log.i(TAG, "Using E164 (version 1).");
|
||||
version = 1;
|
||||
localId = TextSecurePreferences.getLocalNumber(requireContext()).getBytes();
|
||||
remoteId = recipient.resolve().requireE164().getBytes();
|
||||
}
|
||||
|
||||
this.recipient.observe(this, this::setRecipientText);
|
||||
|
@ -284,8 +292,9 @@ public class VerifyIdentityActivity extends PassphraseRequiredActionBarActivity
|
|||
new AsyncTask<Void, Void, Fingerprint>() {
|
||||
@Override
|
||||
protected Fingerprint doInBackground(Void... params) {
|
||||
return new NumericFingerprintGenerator(5200).createFor(localNumber, localIdentity,
|
||||
remoteNumber, remoteIdentity);
|
||||
return new NumericFingerprintGenerator(5200).createFor(version,
|
||||
localId, localIdentity,
|
||||
remoteId, remoteIdentity);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3,12 +3,15 @@ package org.thoughtcrime.securesms.database;
|
|||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import org.thoughtcrime.securesms.logging.Log;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import net.sqlcipher.database.SQLiteDatabase;
|
||||
|
||||
import org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper;
|
||||
import org.thoughtcrime.securesms.logging.Log;
|
||||
import org.thoughtcrime.securesms.util.Base64;
|
||||
import org.whispersystems.libsignal.util.guava.Optional;
|
||||
import org.whispersystems.signalservice.api.messages.SignalServiceEnvelope;
|
||||
|
@ -17,6 +20,7 @@ import org.whispersystems.signalservice.api.util.UuidUtil;
|
|||
import org.whispersystems.signalservice.internal.util.Util;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.UUID;
|
||||
|
||||
public class PushDatabase extends Database {
|
||||
|
||||
|
@ -76,10 +80,9 @@ public class PushDatabase extends Database {
|
|||
String content = cursor.getString(cursor.getColumnIndexOrThrow(CONTENT));
|
||||
String uuid = cursor.getString(cursor.getColumnIndexOrThrow(SOURCE_UUID));
|
||||
String e164 = cursor.getString(cursor.getColumnIndexOrThrow(SOURCE_E164));
|
||||
SignalServiceAddress address = new SignalServiceAddress(UuidUtil.parseOrNull(uuid), e164);
|
||||
|
||||
return new SignalServiceEnvelope(cursor.getInt(cursor.getColumnIndexOrThrow(TYPE)),
|
||||
address,
|
||||
SignalServiceAddress.fromRaw(uuid, e164),
|
||||
cursor.getInt(cursor.getColumnIndexOrThrow(DEVICE_ID)),
|
||||
cursor.getLong(cursor.getColumnIndexOrThrow(TIMESTAMP)),
|
||||
Util.isEmpty(legacyMessage) ? null : Base64.decode(legacyMessage),
|
||||
|
@ -162,7 +165,7 @@ public class PushDatabase extends Database {
|
|||
String serverGuid = cursor.getString(cursor.getColumnIndexOrThrow(SERVER_GUID));
|
||||
|
||||
return new SignalServiceEnvelope(type,
|
||||
new SignalServiceAddress(UuidUtil.parseOrNull(sourceUuid), sourceE164),
|
||||
SignalServiceAddress.fromRaw(sourceUuid, sourceE164),
|
||||
deviceId,
|
||||
timestamp,
|
||||
legacyMessage != null ? Base64.decode(legacyMessage) : null,
|
||||
|
|
|
@ -1,619 +0,0 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: DeviceName.proto
|
||||
|
||||
package org.thoughtcrime.securesms.devicelist;
|
||||
|
||||
public final class DeviceNameProtos {
|
||||
private DeviceNameProtos() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistry registry) {
|
||||
}
|
||||
public interface DeviceNameOrBuilder
|
||||
extends com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
// optional bytes ephemeralPublic = 1;
|
||||
/**
|
||||
* <code>optional bytes ephemeralPublic = 1;</code>
|
||||
*/
|
||||
boolean hasEphemeralPublic();
|
||||
/**
|
||||
* <code>optional bytes ephemeralPublic = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString getEphemeralPublic();
|
||||
|
||||
// optional bytes syntheticIv = 2;
|
||||
/**
|
||||
* <code>optional bytes syntheticIv = 2;</code>
|
||||
*/
|
||||
boolean hasSyntheticIv();
|
||||
/**
|
||||
* <code>optional bytes syntheticIv = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString getSyntheticIv();
|
||||
|
||||
// optional bytes ciphertext = 3;
|
||||
/**
|
||||
* <code>optional bytes ciphertext = 3;</code>
|
||||
*/
|
||||
boolean hasCiphertext();
|
||||
/**
|
||||
* <code>optional bytes ciphertext = 3;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString getCiphertext();
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code signalservice.DeviceName}
|
||||
*/
|
||||
public static final class DeviceName extends
|
||||
com.google.protobuf.GeneratedMessage
|
||||
implements DeviceNameOrBuilder {
|
||||
// Use DeviceName.newBuilder() to construct.
|
||||
private DeviceName(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
|
||||
super(builder);
|
||||
this.unknownFields = builder.getUnknownFields();
|
||||
}
|
||||
private DeviceName(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
|
||||
|
||||
private static final DeviceName defaultInstance;
|
||||
public static DeviceName getDefaultInstance() {
|
||||
return defaultInstance;
|
||||
}
|
||||
|
||||
public DeviceName getDefaultInstanceForType() {
|
||||
return defaultInstance;
|
||||
}
|
||||
|
||||
private final com.google.protobuf.UnknownFieldSet unknownFields;
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
private DeviceName(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
initFields();
|
||||
int mutable_bitField0_ = 0;
|
||||
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
|
||||
com.google.protobuf.UnknownFieldSet.newBuilder();
|
||||
try {
|
||||
boolean done = false;
|
||||
while (!done) {
|
||||
int tag = input.readTag();
|
||||
switch (tag) {
|
||||
case 0:
|
||||
done = true;
|
||||
break;
|
||||
default: {
|
||||
if (!parseUnknownField(input, unknownFields,
|
||||
extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 10: {
|
||||
bitField0_ |= 0x00000001;
|
||||
ephemeralPublic_ = input.readBytes();
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
bitField0_ |= 0x00000002;
|
||||
syntheticIv_ = input.readBytes();
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
bitField0_ |= 0x00000004;
|
||||
ciphertext_ = input.readBytes();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e.getMessage()).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
this.unknownFields = unknownFields.build();
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return org.thoughtcrime.securesms.devicelist.DeviceNameProtos.internal_static_signalservice_DeviceName_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return org.thoughtcrime.securesms.devicelist.DeviceNameProtos.internal_static_signalservice_DeviceName_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName.class, org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName.Builder.class);
|
||||
}
|
||||
|
||||
public static com.google.protobuf.Parser<DeviceName> PARSER =
|
||||
new com.google.protobuf.AbstractParser<DeviceName>() {
|
||||
public DeviceName parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new DeviceName(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<DeviceName> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
private int bitField0_;
|
||||
// optional bytes ephemeralPublic = 1;
|
||||
public static final int EPHEMERALPUBLIC_FIELD_NUMBER = 1;
|
||||
private com.google.protobuf.ByteString ephemeralPublic_;
|
||||
/**
|
||||
* <code>optional bytes ephemeralPublic = 1;</code>
|
||||
*/
|
||||
public boolean hasEphemeralPublic() {
|
||||
return ((bitField0_ & 0x00000001) == 0x00000001);
|
||||
}
|
||||
/**
|
||||
* <code>optional bytes ephemeralPublic = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString getEphemeralPublic() {
|
||||
return ephemeralPublic_;
|
||||
}
|
||||
|
||||
// optional bytes syntheticIv = 2;
|
||||
public static final int SYNTHETICIV_FIELD_NUMBER = 2;
|
||||
private com.google.protobuf.ByteString syntheticIv_;
|
||||
/**
|
||||
* <code>optional bytes syntheticIv = 2;</code>
|
||||
*/
|
||||
public boolean hasSyntheticIv() {
|
||||
return ((bitField0_ & 0x00000002) == 0x00000002);
|
||||
}
|
||||
/**
|
||||
* <code>optional bytes syntheticIv = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString getSyntheticIv() {
|
||||
return syntheticIv_;
|
||||
}
|
||||
|
||||
// optional bytes ciphertext = 3;
|
||||
public static final int CIPHERTEXT_FIELD_NUMBER = 3;
|
||||
private com.google.protobuf.ByteString ciphertext_;
|
||||
/**
|
||||
* <code>optional bytes ciphertext = 3;</code>
|
||||
*/
|
||||
public boolean hasCiphertext() {
|
||||
return ((bitField0_ & 0x00000004) == 0x00000004);
|
||||
}
|
||||
/**
|
||||
* <code>optional bytes ciphertext = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString getCiphertext() {
|
||||
return ciphertext_;
|
||||
}
|
||||
|
||||
private void initFields() {
|
||||
ephemeralPublic_ = com.google.protobuf.ByteString.EMPTY;
|
||||
syntheticIv_ = com.google.protobuf.ByteString.EMPTY;
|
||||
ciphertext_ = com.google.protobuf.ByteString.EMPTY;
|
||||
}
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized != -1) return isInitialized == 1;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
getSerializedSize();
|
||||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
output.writeBytes(1, ephemeralPublic_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
output.writeBytes(2, syntheticIv_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||
output.writeBytes(3, ciphertext_);
|
||||
}
|
||||
getUnknownFields().writeTo(output);
|
||||
}
|
||||
|
||||
private int memoizedSerializedSize = -1;
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeBytesSize(1, ephemeralPublic_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeBytesSize(2, syntheticIv_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeBytesSize(3, ciphertext_);
|
||||
}
|
||||
size += getUnknownFields().getSerializedSize();
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 0L;
|
||||
@java.lang.Override
|
||||
protected java.lang.Object writeReplace()
|
||||
throws java.io.ObjectStreamException {
|
||||
return super.writeReplace();
|
||||
}
|
||||
|
||||
public static org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseFrom(input);
|
||||
}
|
||||
public static org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseFrom(input, extensionRegistry);
|
||||
}
|
||||
public static org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseDelimitedFrom(input);
|
||||
}
|
||||
public static org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseDelimitedFrom(input, extensionRegistry);
|
||||
}
|
||||
public static org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseFrom(input);
|
||||
}
|
||||
public static org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseFrom(input, extensionRegistry);
|
||||
}
|
||||
|
||||
public static Builder newBuilder() { return Builder.create(); }
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder(org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName prototype) {
|
||||
return newBuilder().mergeFrom(prototype);
|
||||
}
|
||||
public Builder toBuilder() { return newBuilder(this); }
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code signalservice.DeviceName}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessage.Builder<Builder>
|
||||
implements org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceNameOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return org.thoughtcrime.securesms.devicelist.DeviceNameProtos.internal_static_signalservice_DeviceName_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return org.thoughtcrime.securesms.devicelist.DeviceNameProtos.internal_static_signalservice_DeviceName_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName.class, org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
private static Builder create() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
ephemeralPublic_ = com.google.protobuf.ByteString.EMPTY;
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
syntheticIv_ = com.google.protobuf.ByteString.EMPTY;
|
||||
bitField0_ = (bitField0_ & ~0x00000002);
|
||||
ciphertext_ = com.google.protobuf.ByteString.EMPTY;
|
||||
bitField0_ = (bitField0_ & ~0x00000004);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder clone() {
|
||||
return create().mergeFrom(buildPartial());
|
||||
}
|
||||
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return org.thoughtcrime.securesms.devicelist.DeviceNameProtos.internal_static_signalservice_DeviceName_descriptor;
|
||||
}
|
||||
|
||||
public org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName getDefaultInstanceForType() {
|
||||
return org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName.getDefaultInstance();
|
||||
}
|
||||
|
||||
public org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName build() {
|
||||
org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName buildPartial() {
|
||||
org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName result = new org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName(this);
|
||||
int from_bitField0_ = bitField0_;
|
||||
int to_bitField0_ = 0;
|
||||
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
to_bitField0_ |= 0x00000001;
|
||||
}
|
||||
result.ephemeralPublic_ = ephemeralPublic_;
|
||||
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
to_bitField0_ |= 0x00000002;
|
||||
}
|
||||
result.syntheticIv_ = syntheticIv_;
|
||||
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
|
||||
to_bitField0_ |= 0x00000004;
|
||||
}
|
||||
result.ciphertext_ = ciphertext_;
|
||||
result.bitField0_ = to_bitField0_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName) {
|
||||
return mergeFrom((org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName other) {
|
||||
if (other == org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName.getDefaultInstance()) return this;
|
||||
if (other.hasEphemeralPublic()) {
|
||||
setEphemeralPublic(other.getEphemeralPublic());
|
||||
}
|
||||
if (other.hasSyntheticIv()) {
|
||||
setSyntheticIv(other.getSyntheticIv());
|
||||
}
|
||||
if (other.hasCiphertext()) {
|
||||
setCiphertext(other.getCiphertext());
|
||||
}
|
||||
this.mergeUnknownFields(other.getUnknownFields());
|
||||
return this;
|
||||
}
|
||||
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (org.thoughtcrime.securesms.devicelist.DeviceNameProtos.DeviceName) e.getUnfinishedMessage();
|
||||
throw e;
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
private int bitField0_;
|
||||
|
||||
// optional bytes ephemeralPublic = 1;
|
||||
private com.google.protobuf.ByteString ephemeralPublic_ = com.google.protobuf.ByteString.EMPTY;
|
||||
/**
|
||||
* <code>optional bytes ephemeralPublic = 1;</code>
|
||||
*/
|
||||
public boolean hasEphemeralPublic() {
|
||||
return ((bitField0_ & 0x00000001) == 0x00000001);
|
||||
}
|
||||
/**
|
||||
* <code>optional bytes ephemeralPublic = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString getEphemeralPublic() {
|
||||
return ephemeralPublic_;
|
||||
}
|
||||
/**
|
||||
* <code>optional bytes ephemeralPublic = 1;</code>
|
||||
*/
|
||||
public Builder setEphemeralPublic(com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
bitField0_ |= 0x00000001;
|
||||
ephemeralPublic_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional bytes ephemeralPublic = 1;</code>
|
||||
*/
|
||||
public Builder clearEphemeralPublic() {
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
ephemeralPublic_ = getDefaultInstance().getEphemeralPublic();
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
// optional bytes syntheticIv = 2;
|
||||
private com.google.protobuf.ByteString syntheticIv_ = com.google.protobuf.ByteString.EMPTY;
|
||||
/**
|
||||
* <code>optional bytes syntheticIv = 2;</code>
|
||||
*/
|
||||
public boolean hasSyntheticIv() {
|
||||
return ((bitField0_ & 0x00000002) == 0x00000002);
|
||||
}
|
||||
/**
|
||||
* <code>optional bytes syntheticIv = 2;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString getSyntheticIv() {
|
||||
return syntheticIv_;
|
||||
}
|
||||
/**
|
||||
* <code>optional bytes syntheticIv = 2;</code>
|
||||
*/
|
||||
public Builder setSyntheticIv(com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
bitField0_ |= 0x00000002;
|
||||
syntheticIv_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional bytes syntheticIv = 2;</code>
|
||||
*/
|
||||
public Builder clearSyntheticIv() {
|
||||
bitField0_ = (bitField0_ & ~0x00000002);
|
||||
syntheticIv_ = getDefaultInstance().getSyntheticIv();
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
// optional bytes ciphertext = 3;
|
||||
private com.google.protobuf.ByteString ciphertext_ = com.google.protobuf.ByteString.EMPTY;
|
||||
/**
|
||||
* <code>optional bytes ciphertext = 3;</code>
|
||||
*/
|
||||
public boolean hasCiphertext() {
|
||||
return ((bitField0_ & 0x00000004) == 0x00000004);
|
||||
}
|
||||
/**
|
||||
* <code>optional bytes ciphertext = 3;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString getCiphertext() {
|
||||
return ciphertext_;
|
||||
}
|
||||
/**
|
||||
* <code>optional bytes ciphertext = 3;</code>
|
||||
*/
|
||||
public Builder setCiphertext(com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
bitField0_ |= 0x00000004;
|
||||
ciphertext_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional bytes ciphertext = 3;</code>
|
||||
*/
|
||||
public Builder clearCiphertext() {
|
||||
bitField0_ = (bitField0_ & ~0x00000004);
|
||||
ciphertext_ = getDefaultInstance().getCiphertext();
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:signalservice.DeviceName)
|
||||
}
|
||||
|
||||
static {
|
||||
defaultInstance = new DeviceName(true);
|
||||
defaultInstance.initFields();
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:signalservice.DeviceName)
|
||||
}
|
||||
|
||||
private static com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_signalservice_DeviceName_descriptor;
|
||||
private static
|
||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
||||
internal_static_signalservice_DeviceName_fieldAccessorTable;
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
}
|
||||
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n\020DeviceName.proto\022\rsignalservice\"N\n\nDev" +
|
||||
"iceName\022\027\n\017ephemeralPublic\030\001 \001(\014\022\023\n\013synt" +
|
||||
"heticIv\030\002 \001(\014\022\022\n\nciphertext\030\003 \001(\014B9\n%org" +
|
||||
".thoughtcrime.securesms.devicelistB\020Devi" +
|
||||
"ceNameProtos"
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
|
||||
public com.google.protobuf.ExtensionRegistry assignDescriptors(
|
||||
com.google.protobuf.Descriptors.FileDescriptor root) {
|
||||
descriptor = root;
|
||||
internal_static_signalservice_DeviceName_descriptor =
|
||||
getDescriptor().getMessageTypes().get(0);
|
||||
internal_static_signalservice_DeviceName_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||
internal_static_signalservice_DeviceName_descriptor,
|
||||
new java.lang.String[] { "EphemeralPublic", "SyntheticIv", "Ciphertext", });
|
||||
return null;
|
||||
}
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
}, assigner);
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
|
@ -331,7 +331,7 @@ public abstract class PushSendJob extends SendJob {
|
|||
|
||||
protected SignalServiceSyncMessage buildSelfSendSyncMessage(@NonNull Context context, @NonNull SignalServiceDataMessage message, Optional<UnidentifiedAccessPair> syncAccess) {
|
||||
SignalServiceAddress localAddress = new SignalServiceAddress(TextSecurePreferences.getLocalUuid(context), TextSecurePreferences.getLocalNumber(context));
|
||||
SentTranscriptMessage transcript = new SentTranscriptMessage(localAddress,
|
||||
SentTranscriptMessage transcript = new SentTranscriptMessage(Optional.of(localAddress),
|
||||
message.getTimestamp(),
|
||||
message,
|
||||
message.getExpiresInSeconds(),
|
||||
|
|
|
@ -276,8 +276,8 @@ dependencyVerification {
|
|||
['com.google.guava:listenablefuture:1.0',
|
||||
'e4ad7607e5c0477c6f890ef26a49cb8d1bb4dffb650bab4502afee64644e3069'],
|
||||
|
||||
['com.google.protobuf:protobuf-java:2.5.0',
|
||||
'e0c1c64575c005601725e7c6a02cebf9e1285e888f756b2a1d73ffa8d725cc74'],
|
||||
['com.google.protobuf:protobuf-javalite:3.10.0',
|
||||
'215a94dbe100130295906b531bb72a26965c7ac8fcd9a75bf8054a8ac2abf4b4'],
|
||||
|
||||
['com.google.zxing:android-integration:3.1.0',
|
||||
'89e56aadf1164bd71e57949163c53abf90af368b51669c0d4a47a163335f95c4'],
|
||||
|
@ -354,11 +354,11 @@ dependencyVerification {
|
|||
['org.signal:ringrtc-android:0.1.9',
|
||||
'3084a1c874290dccb5ab9efe0cd59aec23c07cb7ddec49cfaec221c569beff01'],
|
||||
|
||||
['org.signal:signal-metadata-android:0.0.5',
|
||||
['org.signal:signal-metadata-android:0.1.0',
|
||||
'e79ca9231ec07b05849bc048c643fe2cec48ee781ba5aa8165847a3c90178684'],
|
||||
|
||||
['org.signal:signal-metadata-java:0.0.5',
|
||||
'086841d4c494388d3102aaadc42a0af7fa8096be603213009bf2bd77920d910c'],
|
||||
['org.signal:signal-metadata-java:0.1.0',
|
||||
'f3faa23b7d9b5096d12979c35679d1e3b5e007522d8bef167a28e456f2a7c7d9'],
|
||||
|
||||
['org.threeten:threetenbp:1.3.6',
|
||||
'f4c23ffaaed717c3b99c003e0ee02d6d66377fd47d866fec7d971bd8644fc1a7'],
|
||||
|
@ -369,17 +369,17 @@ dependencyVerification {
|
|||
['org.whispersystems:curve25519-java:0.5.0',
|
||||
'0aadd43cf01d11e9b58f867b3c4f25c3194e8b0623d1953d32dfbfbee009e38d'],
|
||||
|
||||
['org.whispersystems:signal-protocol-android:2.7.1',
|
||||
'c80aac5f93114da2810e2e89437831f79fcbc8bece652f64aeab313a651cba85'],
|
||||
['org.whispersystems:signal-protocol-android:2.8.1',
|
||||
'9eff33fa6a541334f647906cb6f4a9bb26efa6988c7abdb985f3995a6d10aa48'],
|
||||
|
||||
['org.whispersystems:signal-protocol-java:2.7.1',
|
||||
'7f6df67a963acbab7716424b01b12fa7279f18a9623a2a7c8ba7b1c285830168'],
|
||||
['org.whispersystems:signal-protocol-java:2.8.1',
|
||||
'b19db36839ab008fdccefc7f8c005f2ea43dc7c7298a209bc424e6f9b6d5617b'],
|
||||
|
||||
['org.whispersystems:signal-service-android:2.14.0',
|
||||
'24e7a7760f14a261d44b8d76fe6004157f7e09d7898c88ddb501ceabea47b6f6'],
|
||||
['org.whispersystems:signal-service-android:2.15.0',
|
||||
'27c6cf63393a2d466474e45162ec254c557f6a19e91962d0e4acc870373c41fd'],
|
||||
|
||||
['org.whispersystems:signal-service-java:2.14.0',
|
||||
'3af7d00d1bacd5b9d73da6f287b6ce68579a8e4700ff471464a81ac93f9d4cf9'],
|
||||
['org.whispersystems:signal-service-java:2.15.0',
|
||||
'38298e3eae7f5f93e5169541261fa04cbfebcf91599368890bfaedb158662979'],
|
||||
|
||||
['pl.tajchert:waitingdots:0.1.0',
|
||||
'2835d49e0787dbcb606c5a60021ced66578503b1e9fddcd7a5ef0cd5f095ba2c'],
|
||||
|
|
Loading…
Add table
Reference in a new issue