mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-01 07:46:47 +00:00
Clarify ProvisioningAddress field naming
This commit is contained in:
1 parent
b2211de8d8
commit
b284e95394
2 files changed
+6
-7
No files matched your search
+4
-5
@@ -5,7 +5,6 @@
|
||||
|
||||
package org.whispersystems.textsecuregcm.websocket;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import org.whispersystems.textsecuregcm.auth.AuthenticatedDevice;
|
||||
import org.whispersystems.textsecuregcm.entities.MessageProtos;
|
||||
import org.whispersystems.textsecuregcm.entities.ProvisioningMessage;
|
||||
@@ -57,15 +56,15 @@ public class ProvisioningConnectListener implements WebSocketConnectListener {
|
||||
});
|
||||
|
||||
context.getClient().sendRequest("PUT", "/v1/address", List.of(HeaderUtils.getTimestampHeader()),
|
||||
Optional.of(generateProvisioningUuid().toByteArray()));
|
||||
Optional.of(generateProvisioningAddress().toByteArray()));
|
||||
}
|
||||
|
||||
private static MessageProtos.ProvisioningUuid generateProvisioningUuid() {
|
||||
private static MessageProtos.ProvisioningAddress generateProvisioningAddress() {
|
||||
final byte[] provisioningAddress = new byte[16];
|
||||
new SecureRandom().nextBytes(provisioningAddress);
|
||||
|
||||
return MessageProtos.ProvisioningUuid.newBuilder()
|
||||
.setUuid(Base64.getUrlEncoder().encodeToString(provisioningAddress))
|
||||
return MessageProtos.ProvisioningAddress.newBuilder()
|
||||
.setAddress(Base64.getUrlEncoder().encodeToString(provisioningAddress))
|
||||
.build();
|
||||
}
|
||||
}
|
||||
@@ -38,8 +38,8 @@ message Envelope {
|
||||
// next: 19
|
||||
}
|
||||
|
||||
message ProvisioningUuid {
|
||||
optional string uuid = 1;
|
||||
message ProvisioningAddress {
|
||||
optional string address = 1;
|
||||
}
|
||||
|
||||
message ServerCertificate {
|
||||
|
||||
Reference in new issue
Block a user