mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 02:20:39 +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() {
|
||||
// TODO support UUID capable sender certificates
|
||||
// byte[] certificate = accountManager.getSenderCertificateForPhoneNumberPrivacy();
|
||||
byte[] certificate;
|
||||
try {
|
||||
certificate = accountManager.getSenderCertificate();
|
||||
if (account.isPhoneNumberShared()) {
|
||||
certificate = accountManager.getSenderCertificate();
|
||||
} else {
|
||||
certificate = accountManager.getSenderCertificateForPhoneNumberPrivacy();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
logger.warn("Failed to get sender certificate, ignoring: {}", e.getMessage());
|
||||
return null;
|
||||
|
|
|
@ -878,6 +878,11 @@ public class SignalAccount implements Closeable {
|
|||
return true;
|
||||
}
|
||||
|
||||
public boolean isPhoneNumberShared() {
|
||||
// TODO make configurable
|
||||
return true;
|
||||
}
|
||||
|
||||
public void finishRegistration(final UUID uuid, final MasterKey masterKey, final String pin) {
|
||||
this.pinMasterKey = masterKey;
|
||||
this.encryptedDeviceName = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue