mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 20:48:43 +00:00
Add extra data to the provisioning proto.
This commit is contained in:
committed by
Cody Henthorne
parent
dbc5112ada
commit
a0de2577e8
@@ -195,7 +195,7 @@ public class DeviceActivity extends PassphraseRequiredActivity
|
|||||||
ProfileKey profileKey = ProfileKeyUtil.getSelfProfileKey();
|
ProfileKey profileKey = ProfileKeyUtil.getSelfProfileKey();
|
||||||
|
|
||||||
TextSecurePreferences.setMultiDevice(DeviceActivity.this, true);
|
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;
|
return SUCCESS;
|
||||||
} catch (NotFoundException e) {
|
} catch (NotFoundException e) {
|
||||||
|
|||||||
@@ -639,6 +639,7 @@ public class SignalServiceAccountManager {
|
|||||||
IdentityKeyPair aciIdentityKeyPair,
|
IdentityKeyPair aciIdentityKeyPair,
|
||||||
IdentityKeyPair pniIdentityKeyPair,
|
IdentityKeyPair pniIdentityKeyPair,
|
||||||
ProfileKey profileKey,
|
ProfileKey profileKey,
|
||||||
|
MasterKey masterKey,
|
||||||
String code)
|
String code)
|
||||||
throws InvalidKeyException, IOException
|
throws InvalidKeyException, IOException
|
||||||
{
|
{
|
||||||
@@ -661,7 +662,8 @@ public class SignalServiceAccountManager {
|
|||||||
.number(e164)
|
.number(e164)
|
||||||
.profileKey(ByteString.of(profileKey.serialize()))
|
.profileKey(ByteString.of(profileKey.serialize()))
|
||||||
.provisioningCode(code)
|
.provisioningCode(code)
|
||||||
.provisioningVersion(ProvisioningVersion.CURRENT.getValue());
|
.provisioningVersion(ProvisioningVersion.CURRENT.getValue())
|
||||||
|
.masterKey(ByteString.of(masterKey.serialize()));
|
||||||
|
|
||||||
byte[] ciphertext = cipher.encrypt(message.build());
|
byte[] ciphertext = cipher.encrypt(message.build());
|
||||||
this.pushServiceSocket.sendProvisioningMessage(deviceIdentifier, ciphertext);
|
this.pushServiceSocket.sendProvisioningMessage(deviceIdentifier, ciphertext);
|
||||||
|
|||||||
@@ -32,7 +32,8 @@ message ProvisionMessage {
|
|||||||
optional bytes profileKey = 6;
|
optional bytes profileKey = 6;
|
||||||
optional bool readReceipts = 7;
|
optional bool readReceipts = 7;
|
||||||
optional uint32 provisioningVersion = 9;
|
optional uint32 provisioningVersion = 9;
|
||||||
// NEXT ID: 13
|
optional bytes masterKey = 13;
|
||||||
|
// NEXT ID: 14
|
||||||
}
|
}
|
||||||
|
|
||||||
enum ProvisioningVersion {
|
enum ProvisioningVersion {
|
||||||
|
|||||||
Reference in New Issue
Block a user