mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Remove v2 suffix from secure value recovery
This commit is contained in:
parent
19dc2d446b
commit
a6ab8f7e80
4 changed files with 11 additions and 11 deletions
|
@ -114,7 +114,7 @@ public class Context implements AutoCloseable {
|
||||||
}
|
}
|
||||||
|
|
||||||
PinHelper getPinHelper() {
|
PinHelper getPinHelper() {
|
||||||
return getOrCreate(() -> pinHelper, () -> pinHelper = new PinHelper(dependencies.getSecureValueRecoveryV2()));
|
return getOrCreate(() -> pinHelper, () -> pinHelper = new PinHelper(dependencies.getSecureValueRecovery()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public PreKeyHelper getPreKeyHelper() {
|
public PreKeyHelper getPreKeyHelper() {
|
||||||
|
|
|
@ -32,11 +32,11 @@ public class PinHelper {
|
||||||
case SecureValueRecovery.BackupResponse.Success success -> {
|
case SecureValueRecovery.BackupResponse.Success success -> {
|
||||||
}
|
}
|
||||||
case SecureValueRecovery.BackupResponse.ServerRejected serverRejected ->
|
case SecureValueRecovery.BackupResponse.ServerRejected serverRejected ->
|
||||||
logger.warn("Backup svr2 failed: ServerRejected");
|
logger.warn("Backup svr failed: ServerRejected");
|
||||||
case SecureValueRecovery.BackupResponse.EnclaveNotFound enclaveNotFound ->
|
case SecureValueRecovery.BackupResponse.EnclaveNotFound enclaveNotFound ->
|
||||||
logger.warn("Backup svr2 failed: EnclaveNotFound");
|
logger.warn("Backup svr failed: EnclaveNotFound");
|
||||||
case SecureValueRecovery.BackupResponse.ExposeFailure exposeFailure ->
|
case SecureValueRecovery.BackupResponse.ExposeFailure exposeFailure ->
|
||||||
logger.warn("Backup svr2 failed: ExposeFailure");
|
logger.warn("Backup svr failed: ExposeFailure");
|
||||||
case SecureValueRecovery.BackupResponse.ApplicationError error ->
|
case SecureValueRecovery.BackupResponse.ApplicationError error ->
|
||||||
throw new IOException(error.getException());
|
throw new IOException(error.getException());
|
||||||
case SecureValueRecovery.BackupResponse.NetworkError error -> throw error.getException();
|
case SecureValueRecovery.BackupResponse.NetworkError error -> throw error.getException();
|
||||||
|
|
|
@ -96,11 +96,11 @@ public class RegistrationManagerImpl implements RegistrationManager {
|
||||||
userAgent,
|
userAgent,
|
||||||
ServiceConfig.AUTOMATIC_NETWORK_RETRY,
|
ServiceConfig.AUTOMATIC_NETWORK_RETRY,
|
||||||
ServiceConfig.GROUP_MAX_SIZE);
|
ServiceConfig.GROUP_MAX_SIZE);
|
||||||
final var secureValueRecoveryV2 = serviceEnvironmentConfig.svr2Mrenclaves()
|
final var secureValueRecovery = serviceEnvironmentConfig.svr2Mrenclaves()
|
||||||
.stream()
|
.stream()
|
||||||
.map(mr -> (SecureValueRecovery) accountManager.getSecureValueRecoveryV2(mr))
|
.map(mr -> (SecureValueRecovery) this.unauthenticatedAccountManager.getSecureValueRecoveryV2(mr))
|
||||||
.toList();
|
.toList();
|
||||||
this.pinHelper = new PinHelper(secureValueRecoveryV2);
|
this.pinHelper = new PinHelper(secureValueRecovery);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class SignalDependencies {
|
||||||
private SignalServiceMessageReceiver messageReceiver;
|
private SignalServiceMessageReceiver messageReceiver;
|
||||||
private SignalServiceMessageSender messageSender;
|
private SignalServiceMessageSender messageSender;
|
||||||
|
|
||||||
private List<SecureValueRecovery> secureValueRecoveryV2;
|
private List<SecureValueRecovery> secureValueRecovery;
|
||||||
private ProfileService profileService;
|
private ProfileService profileService;
|
||||||
|
|
||||||
SignalDependencies(
|
SignalDependencies(
|
||||||
|
@ -205,9 +205,9 @@ public class SignalDependencies {
|
||||||
ServiceConfig.MAX_ENVELOPE_SIZE));
|
ServiceConfig.MAX_ENVELOPE_SIZE));
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<SecureValueRecovery> getSecureValueRecoveryV2() {
|
public List<SecureValueRecovery> getSecureValueRecovery() {
|
||||||
return getOrCreate(() -> secureValueRecoveryV2,
|
return getOrCreate(() -> secureValueRecovery,
|
||||||
() -> secureValueRecoveryV2 = serviceEnvironmentConfig.svr2Mrenclaves()
|
() -> secureValueRecovery = serviceEnvironmentConfig.svr2Mrenclaves()
|
||||||
.stream()
|
.stream()
|
||||||
.map(mr -> (SecureValueRecovery) getAccountManager().getSecureValueRecoveryV2(mr))
|
.map(mr -> (SecureValueRecovery) getAccountManager().getSecureValueRecoveryV2(mr))
|
||||||
.toList());
|
.toList());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue