+ public static AccountAttributes.Capabilities getCapabilities() {
+ return capabilities;
+ }
+
+ static KeyStore getIasKeyStore() {
+ try {
+ TrustStore contactTrustStore = IAS_TRUST_STORE;
+
+ KeyStore keyStore = KeyStore.getInstance("BKS");
+ keyStore.load(contactTrustStore.getKeyStoreInputStream(),
+ contactTrustStore.getKeyStorePassword().toCharArray());
+
+ return keyStore;
+ } catch (KeyStoreException | CertificateException | IOException | NoSuchAlgorithmException e) {
+ throw new AssertionError(e);
+ }
+ }
+
+ static KeyBackupService createKeyBackupService(SignalServiceAccountManager accountManager) {
+ KeyStore keyStore = ServiceConfig.getIasKeyStore();
+
+ return accountManager.getKeyBackupService(keyStore,
+ ServiceConfig.KEY_BACKUP_ENCLAVE_NAME,
+ ServiceConfig.KEY_BACKUP_SERVICE_ID,
+ ServiceConfig.KEY_BACKUP_MRENCLAVE,
+ 10);
+ }
+
+ static ECPublicKey getUnidentifiedSenderTrustRoot() {
+ try {
+ return Curve.decodePoint(UNIDENTIFIED_SENDER_TRUST_ROOT, 0);
+ } catch (InvalidKeyException e) {
+ throw new AssertionError(e);
+ }
+ }
+