Search in sources :

Example 1 with IasTrustStore

use of org.thoughtcrime.securesms.push.IasTrustStore in project Signal-Android by WhisperSystems.

the class ContactDiscoveryV2 method getIasKeyStore.

private static KeyStore getIasKeyStore(@NonNull Context context) {
    try {
        TrustStore contactTrustStore = new IasTrustStore(context);
        KeyStore keyStore = KeyStore.getInstance("BKS");
        keyStore.load(contactTrustStore.getKeyStoreInputStream(), contactTrustStore.getKeyStorePassword().toCharArray());
        return keyStore;
    } catch (KeyStoreException | CertificateException | IOException | NoSuchAlgorithmException e) {
        throw new AssertionError(e);
    }
}
Also used : CertificateException(java.security.cert.CertificateException) TrustStore(org.whispersystems.signalservice.api.push.TrustStore) IasTrustStore(org.thoughtcrime.securesms.push.IasTrustStore) KeyStoreException(java.security.KeyStoreException) IOException(java.io.IOException) NoSuchAlgorithmException(java.security.NoSuchAlgorithmException) KeyStore(java.security.KeyStore) IasTrustStore(org.thoughtcrime.securesms.push.IasTrustStore)

Example 2 with IasTrustStore

use of org.thoughtcrime.securesms.push.IasTrustStore in project Signal-Android by WhisperSystems.

the class IasKeyStore method getIasKeyStore.

public static KeyStore getIasKeyStore(@NonNull Context context) {
    try {
        TrustStore contactTrustStore = new IasTrustStore(context);
        KeyStore keyStore = KeyStore.getInstance("BKS");
        keyStore.load(contactTrustStore.getKeyStoreInputStream(), contactTrustStore.getKeyStorePassword().toCharArray());
        return keyStore;
    } catch (KeyStoreException | CertificateException | IOException | NoSuchAlgorithmException e) {
        throw new AssertionError(e);
    }
}
Also used : CertificateException(java.security.cert.CertificateException) IasTrustStore(org.thoughtcrime.securesms.push.IasTrustStore) TrustStore(org.whispersystems.signalservice.api.push.TrustStore) KeyStoreException(java.security.KeyStoreException) IOException(java.io.IOException) NoSuchAlgorithmException(java.security.NoSuchAlgorithmException) KeyStore(java.security.KeyStore) IasTrustStore(org.thoughtcrime.securesms.push.IasTrustStore)

Example 3 with IasTrustStore

use of org.thoughtcrime.securesms.push.IasTrustStore in project Signal-Android by signalapp.

the class IasKeyStore method getIasKeyStore.

public static KeyStore getIasKeyStore(@NonNull Context context) {
    try {
        TrustStore contactTrustStore = new IasTrustStore(context);
        KeyStore keyStore = KeyStore.getInstance("BKS");
        keyStore.load(contactTrustStore.getKeyStoreInputStream(), contactTrustStore.getKeyStorePassword().toCharArray());
        return keyStore;
    } catch (KeyStoreException | CertificateException | IOException | NoSuchAlgorithmException e) {
        throw new AssertionError(e);
    }
}
Also used : CertificateException(java.security.cert.CertificateException) IasTrustStore(org.thoughtcrime.securesms.push.IasTrustStore) TrustStore(org.whispersystems.signalservice.api.push.TrustStore) KeyStoreException(java.security.KeyStoreException) IOException(java.io.IOException) NoSuchAlgorithmException(java.security.NoSuchAlgorithmException) KeyStore(java.security.KeyStore) IasTrustStore(org.thoughtcrime.securesms.push.IasTrustStore)

Example 4 with IasTrustStore

use of org.thoughtcrime.securesms.push.IasTrustStore in project Signal-Android by signalapp.

the class ContactDiscoveryV2 method getIasKeyStore.

private static KeyStore getIasKeyStore(@NonNull Context context) {
    try {
        TrustStore contactTrustStore = new IasTrustStore(context);
        KeyStore keyStore = KeyStore.getInstance("BKS");
        keyStore.load(contactTrustStore.getKeyStoreInputStream(), contactTrustStore.getKeyStorePassword().toCharArray());
        return keyStore;
    } catch (KeyStoreException | CertificateException | IOException | NoSuchAlgorithmException e) {
        throw new AssertionError(e);
    }
}
Also used : CertificateException(java.security.cert.CertificateException) TrustStore(org.whispersystems.signalservice.api.push.TrustStore) IasTrustStore(org.thoughtcrime.securesms.push.IasTrustStore) KeyStoreException(java.security.KeyStoreException) IOException(java.io.IOException) NoSuchAlgorithmException(java.security.NoSuchAlgorithmException) KeyStore(java.security.KeyStore) IasTrustStore(org.thoughtcrime.securesms.push.IasTrustStore)

Aggregations

IOException (java.io.IOException)4 KeyStore (java.security.KeyStore)4 KeyStoreException (java.security.KeyStoreException)4 NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)4 CertificateException (java.security.cert.CertificateException)4 IasTrustStore (org.thoughtcrime.securesms.push.IasTrustStore)4 TrustStore (org.whispersystems.signalservice.api.push.TrustStore)4