Reputation: 2810
I am using retrofit for data transfer, but few days ago i got problem with ssl certificates:
SSL handshake aborted ssl=0x7b93fcc0 error during system call. Connection reset by peer
as I understand I need to add tlsv1 certificate inside retrofit...
any suggestions how to do it?
Upvotes: 1
Views: 4011
Reputation: 304
If you are using OkHttp client for Retrofit, you should set up cipher suites like here, just change the TLS version and suits accordingly to your connection type:
ConnectionSpec spec = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
.tlsVersions(TlsVersion.TLS_1_2)
.cipherSuites(
CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
CipherSuite.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
CipherSuite.TLS_DHE_RSA_WITH_AES_128_GCM_SHA256)
.build();
more details on Square's OkHttp wiki
Upvotes: 2