Rollback ssl config

This commit is contained in:
Mieszko Wrzeszczyński 2018-12-05 12:25:31 +01:00
parent fc4f49c3e0
commit 2ca64a66ba
2 changed files with 0 additions and 10 deletions

View File

@ -51,14 +51,6 @@ public class ApiClient {
.readTimeout(REQUEST_TIMEOUT, TimeUnit.SECONDS) .readTimeout(REQUEST_TIMEOUT, TimeUnit.SECONDS)
.writeTimeout(REQUEST_TIMEOUT, TimeUnit.SECONDS); .writeTimeout(REQUEST_TIMEOUT, TimeUnit.SECONDS);
// Android 7.0.0 fix: https://stackoverflow.com/questions/39133437/sslhandshakeexception-handshake-failed-on-android-n-7-0?fbclid=IwAR1FpUjQlE_iP_2hiZ3okHoFs-Ik4AilVcJaKDKs4FHNFIxn7wb-Uxb_WWY
ConnectionSpec spec = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
.tlsVersions(TlsVersion.TLS_1_2)
.cipherSuites(CipherSuite.TLS_DHE_RSA_WITH_AES_256_CBC_SHA)
.build();
httpClient.connectionSpecs(Collections.singletonList(spec));
HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor(); HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
interceptor.setLevel(HttpLoggingInterceptor.Level.BODY); interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);

View File

@ -368,8 +368,6 @@ public class BackgroundLocalizationService extends Service {
if (e instanceof HttpException) { if (e instanceof HttpException) {
ResponseBody responseBody = ((HttpException) e).response().errorBody(); ResponseBody responseBody = ((HttpException) e).response().errorBody();
Log.e("CoordinateService onError", RestApiHelper.getErrorMessage(responseBody)); Log.e("CoordinateService onError", RestApiHelper.getErrorMessage(responseBody));
Log.e("CoordinateService onError", e.toString());
} }
} }
})); }));