Add extra data to the provisioning proto.

This commit is contained in:
Greyson Parrelli 2023-12-04 10:18:52 -05:00 committed by Cody Henthorne
parent dbc5112ada
commit a0de2577e8
3 changed files with 6 additions and 3 deletions

View file

@ -195,7 +195,7 @@ public class DeviceActivity extends PassphraseRequiredActivity
ProfileKey profileKey = ProfileKeyUtil.getSelfProfileKey();
TextSecurePreferences.setMultiDevice(DeviceActivity.this, true);
accountManager.addDevice(ephemeralId, publicKey, aciIdentityKeyPair, pniIdentityKeyPair, profileKey, verificationCode);
accountManager.addDevice(ephemeralId, publicKey, aciIdentityKeyPair, pniIdentityKeyPair, profileKey, SignalStore.svr().getOrCreateMasterKey(), verificationCode);
return SUCCESS;
} catch (NotFoundException e) {

View file

@ -639,6 +639,7 @@ public class SignalServiceAccountManager {
IdentityKeyPair aciIdentityKeyPair,
IdentityKeyPair pniIdentityKeyPair,
ProfileKey profileKey,
MasterKey masterKey,
String code)
throws InvalidKeyException, IOException
{
@ -661,7 +662,8 @@ public class SignalServiceAccountManager {
.number(e164)
.profileKey(ByteString.of(profileKey.serialize()))
.provisioningCode(code)
.provisioningVersion(ProvisioningVersion.CURRENT.getValue());
.provisioningVersion(ProvisioningVersion.CURRENT.getValue())
.masterKey(ByteString.of(masterKey.serialize()));
byte[] ciphertext = cipher.encrypt(message.build());
this.pushServiceSocket.sendProvisioningMessage(deviceIdentifier, ciphertext);

View file

@ -32,7 +32,8 @@ message ProvisionMessage {
optional bytes profileKey = 6;
optional bool readReceipts = 7;
optional uint32 provisioningVersion = 9;
// NEXT ID: 13
optional bytes masterKey = 13;
// NEXT ID: 14
}
enum ProvisioningVersion {