This solution works like a charm.

Thank you very much Harri.

/Kaiduan

On Mon, Jun 18, 2012 at 3:54 PM, Harri Smått <[email protected]> wrote:
> On Jun 18, 2012, at 10:21 PM, Kaiduan Xie wrote:
>> I need to add SNI (Server Name Indication) value to the SSLSocket like
>> HttpsURLConnection does.
>
> If I googled properly it's OpenSSLSocketImpl.setHostname(String) you want to 
> call? This should be doable using reflection too;
>
> SocketFactory f = SSLSocketFactory.getDefault();
> Socket s = f.createSocket(….);
> Method m = s.getClass().getMethod("setHostname", String.class);
> m.invoke(s, "your.host.com");
>
> Plus appropriate try/catches.
>
> --
> H
>
> --
> 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