Quantcast
Channel: Ignite Realtime : Unanswered Discussions - Support
Viewing all articles
Browse latest Browse all 4979

Feature request: SNI support

$
0
0

Hello,

 

it would be nice to add SNI (server name indication, http://http://en.wikipedia.org/wiki/Server_Name_Indication) support to Smack library.

Not all of implementations of SSLSocket support SNI by default, especially in older versions of android (these with Apache HTTP client library).

 

There is simple fix of this by setting the value of hostName to SSLSocket (if not present) by reflection:

 

java.lang.reflect.Method setHostnameMethod = sslSocket.getClass().getMethod("setHostname", String.class)
setHostnameMethod.invoke(sslSocket, host);

 

Thanks for thinking about this.

 

Tomas N.


Viewing all articles
Browse latest Browse all 4979

Trending Articles