Search in sources :

Example 6 with TrustStore

use of org.whispersystems.signalservice.api.push.TrustStore 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

NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)6 TrustStore (org.whispersystems.signalservice.api.push.TrustStore)6 IOException (java.io.IOException)4 KeyStore (java.security.KeyStore)4 KeyStoreException (java.security.KeyStoreException)4 CertificateException (java.security.cert.CertificateException)4 IasTrustStore (org.thoughtcrime.securesms.push.IasTrustStore)4 ModelLoaderFactory (com.bumptech.glide.load.model.ModelLoaderFactory)2 MultiModelLoaderFactory (com.bumptech.glide.load.model.MultiModelLoaderFactory)2 KeyManagementException (java.security.KeyManagementException)2 SSLContext (javax.net.ssl.SSLContext)2 TrustManager (javax.net.ssl.TrustManager)2 X509TrustManager (javax.net.ssl.X509TrustManager)2 OkHttpClient (okhttp3.OkHttpClient)2 SignalServiceTrustStore (org.thoughtcrime.securesms.push.SignalServiceTrustStore)2 Tls12SocketFactory (org.whispersystems.signalservice.api.util.Tls12SocketFactory)2 BlacklistingTrustManager (org.whispersystems.signalservice.internal.util.BlacklistingTrustManager)2