How to make SSL session renewal on Android

I make an SSL connection to the server every 30 seconds, and cants can withstand the overhead of SSL handshaking, which takes almost 6K. I want to use SSL Session Resumption (so that my client uses the SID received from the server in the previous session)

I read this post: Reusing SSL sessions on Android with HttpClient but a magic solution to remove the .register registry string (new scheme ("http", PlainSocketFactory.getSocketFactory (), 80)); just doesn't work for me (I see this in wirehark when the client doesn't send the session id), although it has one.

Is there a better example of using SSLSessionCache / SSLCertificateSocketFactory on Android? thanks

+7
source share
1 answer

Does a longer life help you?

mHttpClient.setKeepAliveStrategy(new ConnectionKeepAliveStrategy() { @Override public long getKeepAliveDuration(HttpResponse response, HttpContext context) { return 60 * 1000; } }); 
0
source

All Articles