mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Implement preliminary phone number privacy for sender certificate
This commit is contained in:
parent
8217541d5e
commit
3643d57d0e
2 changed files with 10 additions and 3 deletions
|
@ -1284,11 +1284,13 @@ public class Manager implements Closeable {
|
||||||
}
|
}
|
||||||
|
|
||||||
private byte[] getSenderCertificate() {
|
private byte[] getSenderCertificate() {
|
||||||
// TODO support UUID capable sender certificates
|
|
||||||
// byte[] certificate = accountManager.getSenderCertificateForPhoneNumberPrivacy();
|
|
||||||
byte[] certificate;
|
byte[] certificate;
|
||||||
try {
|
try {
|
||||||
|
if (account.isPhoneNumberShared()) {
|
||||||
certificate = accountManager.getSenderCertificate();
|
certificate = accountManager.getSenderCertificate();
|
||||||
|
} else {
|
||||||
|
certificate = accountManager.getSenderCertificateForPhoneNumberPrivacy();
|
||||||
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.warn("Failed to get sender certificate, ignoring: {}", e.getMessage());
|
logger.warn("Failed to get sender certificate, ignoring: {}", e.getMessage());
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -878,6 +878,11 @@ public class SignalAccount implements Closeable {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isPhoneNumberShared() {
|
||||||
|
// TODO make configurable
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public void finishRegistration(final UUID uuid, final MasterKey masterKey, final String pin) {
|
public void finishRegistration(final UUID uuid, final MasterKey masterKey, final String pin) {
|
||||||
this.pinMasterKey = masterKey;
|
this.pinMasterKey = masterKey;
|
||||||
this.encryptedDeviceName = null;
|
this.encryptedDeviceName = null;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue