On Sat, Jun 16, 2012 at 5:16 AM, Kaiduan Xie <kaidu...@gmail.com> wrote: > Where is the implementation of HttpsURLConnection? > > From javax\net\ssl\HttpsURLConnection.java, it is an abstract class. > > public abstract class HttpsURLConnection extends HttpURLConnection { > > I would like to dig into the implementation to see how it adds SNI support. > > For non-HTTPS connection I mean the usage of SSL connection is not HTTP. > > I really hope there is some corresponding openSSL API in JAVA to setup > SNI value. > > In openssl, the API is SSL_set_tlsext_host_name(SSL* ssl, char* name). >
There is an setHostname() method in OpenSSLSocketImpl that if called causes NativeCrypto.SSL_set_tlsext_host_name() to be called. That in turn calls SSL_set_tlsext_host_name(). This is not available via the SDK AFAIK, but you could probably try to cast the socket instance and try to use the setHostname() method. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en