Pass down RemoteConfig for TLS minimum version enforcement to libsignal.

This commit is contained in:
andrew-signal
2025-05-01 15:36:07 -05:00
committed by Cody Henthorne
parent 9d1960f065
commit 7c9bab421a
3 changed files with 14 additions and 9 deletions

View File

@@ -261,7 +261,7 @@ public class ApplicationDependencyProvider implements AppDependencies.Provider {
public @NonNull Network provideLibsignalNetwork(@NonNull SignalServiceConfiguration config) {
Network network = new Network(BuildConfig.LIBSIGNAL_NET_ENV, StandardUserAgentInterceptor.USER_AGENT);
LibSignalNetworkExtensions.applyConfiguration(network, config);
LibSignalNetworkExtensions.transformAndSetRemoteConfig(network, RemoteConfig.getMemoryValues());
LibSignalNetworkExtensions.buildAndSetRemoteConfig(network, RemoteConfig.libsignalEnforceMinTlsVersion());
return network;
}

View File

@@ -992,6 +992,14 @@ object RemoteConfig {
value.asBoolean(false) || Environment.IS_NIGHTLY
}
@JvmStatic
@get:JvmName("libsignalEnforceMinTlsVersion")
val libsignalEnforceMinTlsVersion by remoteBoolean(
key = "android.libsignalEnforceMinTlsVersion",
defaultValue = false,
hotSwappable = false
)
/** Whether or not to launch the restore activity after registration is complete, rather than before. */
@JvmStatic
@get:JvmName("restoreAfterRegistration")