Thank you very much Nikolay.

I also found the code from the following link,

http://source-android.frandroid.com/libcore/luni/src/main/java/libcore/net/http/HttpsURLConnectionImpl.java

http://source-android.frandroid.com/libcore/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java

http://source-android.frandroid.com/libcore/luni/src/main/java/libcore/net/http/HttpConnection.java

Cheers,

/Kaiduan

On Fri, Jun 15, 2012 at 8:47 PM, Nikolay Elenkov
<[email protected]> wrote:
> On Sat, Jun 16, 2012 at 5:16 AM, Kaiduan Xie <[email protected]> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to