Open z0rti opened 5 years ago
OKHttpClient documentation recomends relplacing
client.setSslSocketFactory(sslContext.getSocketFactory());
with
TrustManager[] trustManagers = trustManagerFactory.getTrustManagers();
X509TrustManager trustManager = (X509TrustManager) trustManagers[0];
client.sslSocketFactory(sslContext.getSocketFactory(), trustManager)
OkHttpClient client = new OkHttpClient(); SSLContext sslContext = SslUtils.getSslContextForCertificateFile(context, "BPClass2RootCA-sha2.cer"); client.setSslSocketFactory(sslContext.getSocketFactory());
Cannot resolve method 'setSslSocketFactory(javax.net.ssl.SSLSocketFactory)'
Update needed! ;-)