]> nmode's Git Repositories - signal-cli/blobdiff - lib/src/main/java/org/asamk/signal/manager/config/ServiceEnvironmentConfig.java
Add fallback KBS and migrate to current version
[signal-cli] / lib / src / main / java / org / asamk / signal / manager / config / ServiceEnvironmentConfig.java
index b6a6af1d3b05d4ba54ad5b500168716212c4973e..c2013eac242fa078395e64aa297ea221b76e9d58 100644 (file)
@@ -3,6 +3,8 @@ package org.asamk.signal.manager.config;
 import org.signal.libsignal.protocol.ecc.ECPublicKey;
 import org.whispersystems.signalservice.internal.configuration.SignalServiceConfiguration;
 
+import java.util.Collection;
+
 public class ServiceEnvironmentConfig {
 
     private final ServiceEnvironment type;
@@ -11,6 +13,7 @@ public class ServiceEnvironmentConfig {
     private final ECPublicKey unidentifiedSenderTrustRoot;
 
     private final KeyBackupConfig keyBackupConfig;
+    private final Collection<KeyBackupConfig> fallbackKeyBackupConfigs;
 
     private final String cdsMrenclave;
 
@@ -19,12 +22,14 @@ public class ServiceEnvironmentConfig {
             final SignalServiceConfiguration signalServiceConfiguration,
             final ECPublicKey unidentifiedSenderTrustRoot,
             final KeyBackupConfig keyBackupConfig,
+            final Collection<KeyBackupConfig> fallbackKeyBackupConfigs,
             final String cdsMrenclave
     ) {
         this.type = type;
         this.signalServiceConfiguration = signalServiceConfiguration;
         this.unidentifiedSenderTrustRoot = unidentifiedSenderTrustRoot;
         this.keyBackupConfig = keyBackupConfig;
+        this.fallbackKeyBackupConfigs = fallbackKeyBackupConfigs;
         this.cdsMrenclave = cdsMrenclave;
     }
 
@@ -44,6 +49,10 @@ public class ServiceEnvironmentConfig {
         return keyBackupConfig;
     }
 
+    public Collection<KeyBackupConfig> getFallbackKeyBackupConfigs() {
+        return fallbackKeyBackupConfigs;
+    }
+
     public String getCdsMrenclave() {
         return cdsMrenclave;
     }