I am creating an Android application that should work with https. I have no problem connecting https to an https address that does not use TLS with Server Name Extension . But I need to make a connection with an https address that uses TLS with the SNI extension.
What I did for an https address using TLS without hostname extension:
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("https://exampleurl.com/api");
try {
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2);
nameValuePairs.add(new BasicNameValuePair("username", email));
nameValuePairs.add(new BasicNameValuePair("ssh_public_key", publickey));
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = httpclient.execute(httppost);
Log.d(TAG, response.toString());
return response.toString();
} catch (Exception e) {
Log.d(TAG, e.toString());
}
How to add server name pointer extension in TLS on Android. After researching, I found one post on stackoverflow, but I cannot get it to work with this information.
But its a little along the way. “As far as I know, the Android SDK has partial support. The current situation is as follows:
TLS- Gingerbread API HttpsURLConnection SNI.
Apache HTTP, Android, SNI
- Android SNI API- Apache HTTP.
" . sni.velox.ch, SSLCONTEXT (TLS) SSLENGINE, sroid sroid. ".
Android SSL - SNI
, Android, , HttpsURLConnection, SSLCONTEXT (TLS) SSLENGINE.
- , TLS?