]> nmode's Git Repositories - signal-cli/blobdiff - lib/src/main/java/org/asamk/signal/manager/config/LiveConfig.java
Add fallback KBS and migrate to current version
[signal-cli] / lib / src / main / java / org / asamk / signal / manager / config / LiveConfig.java
index 018a859953418e5cb9bff82d3609fc6f1a204718..3ee4a51e35d144602066215da4a34c732f885a12 100644 (file)
@@ -15,6 +15,7 @@ import org.whispersystems.signalservice.internal.configuration.SignalServiceUrl;
 import org.whispersystems.signalservice.internal.configuration.SignalStorageUrl;
 
 import java.util.Base64;
+import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 import java.util.Optional;
@@ -33,6 +34,10 @@ class LiveConfig {
     private final static byte[] KEY_BACKUP_SERVICE_ID = Hex.decode(
             "3a485adb56e2058ef7737764c738c4069dd62bc457637eafb6bbce1ce29ddb89");
     private final static String KEY_BACKUP_MRENCLAVE = "45627094b2ea4a66f4cf0b182858a8dcf4b8479122c3820fe7fd0551a6d4cf5c";
+    private final static String FALLBACK_KEY_BACKUP_ENCLAVE_NAME = "0cedba03535b41b67729ce9924185f831d7767928a1d1689acb689bc079c375f";
+    private final static byte[] FALLBACK_KEY_BACKUP_SERVICE_ID = Hex.decode(
+            "187d2739d22be65e74b65f0055e74d31310e4267e5fac2b1246cc8beba81af39");
+    private final static String FALLBACK_KEY_BACKUP_MRENCLAVE = "ee19f1965b1eefa3dc4204eb70c04f397755f771b8c1909d080c04dad2a6a9ba";
 
     private final static String URL = "https://chat.signal.org";
     private final static String CDN_URL = "https://cdn.signal.org";
@@ -80,6 +85,12 @@ class LiveConfig {
         return new KeyBackupConfig(KEY_BACKUP_ENCLAVE_NAME, KEY_BACKUP_SERVICE_ID, KEY_BACKUP_MRENCLAVE);
     }
 
+    static Collection<KeyBackupConfig> createFallbackKeyBackupConfigs() {
+        return List.of(new KeyBackupConfig(FALLBACK_KEY_BACKUP_ENCLAVE_NAME,
+                FALLBACK_KEY_BACKUP_SERVICE_ID,
+                FALLBACK_KEY_BACKUP_MRENCLAVE));
+    }
+
     static String getCdsMrenclave() {
         return CDS_MRENCLAVE;
     }