Thanks a lot guys for your replies.

@Brian
I haven't tried with 2.3 or 3.0. I will try that and will let you know.
About other Apache or Google HttpClient. It works perfectly fine, with same
proxy server and same https URL.

@Yuliy
I also had the same doubt. But with same proxy server and https URL it
works, so something to do with our side.

@Indicator
I will try debugging wireshark traces. I will keep you posted.


On Wed, Mar 16, 2011 at 2:55 AM, Indicator Veritatis <[email protected]>wrote:

> When I have successfully debugged SSL issues before, it was with
> access to the Apache server logs on the origin server. Set logging to
> the maximum and see what shows up in the error and connection logs.
>
> Or look for known bugs in Apache harmony with the handshake.
>
> There is also a way to share the key with Wireshark and decrypt the
> bytes on the wire, but it is not straightforward, so you should do
> that only as a last resort. But it is unlikely you will be able to
> resolve the issue by looking only at logcat.
>
> On Mar 14, 11:58 pm, swapnil kamble <[email protected]> wrote:
> > Hi All,
> >       I need some suggestion in resolving SSL handshake failure issue.
> > When trying to connect to HTTPS url using
> > javax.net.ssl.HttpsURLConnection in android with code below. I set the
> > properties for proxy host, port and tried opening https connection.
> >
> > props.setProperty("https.proxyHost","co.proxyserver.com");
> > props.setProperty("https.proxyPort","8000");
> >
> > URL targetURL = new URL("https://www.fortify.net";); //
> http://www.fortify.networks properly
> > HttpsURLConnection connection = (HttpsURLConnection)
> targetURL.openConnection();
> > //Proxy proxy = new Proxy(Proxy.Type.HTTP,new
> > InetSocketAddress("co.proxyserver.com",8000));//Doesn't work either
> > //connection = (HttpsURLConnection) targetURL.openConnection(proxy);
> > //java.io.IOException: SSL handshake failure: I/O error during system
> > call, Unknown error: 0
> >
> > connection.connect();
> >
> > The same code works perfectly fine when ran with jdk on desktop.
> > There is something SSL protocol related error during ssl handshake in
> > s23_clnt.c of openssl code.
> >
> > There are no issues in connecting to http URLs.
> >
> > *- Steps to reproduce *
> > 1. Use the above code in an android activity
> > 2. Run it behind the proxy by correctly replacing proxy host and port
> > *- What happened.*
> > 03-15 11:41:28.069: WARN/System.err(1312): java.io.IOException: SSL
> > handshake failure: Failure in SSL library, usually a protocol error
> > 03-15 11:41:28.069: WARN/System.err(1312): error:140770FC:SSL
> > routines:SSL23_GET_SERVER_HELLO:unknown protocol
> > (external/openssl/ssl/s23_clnt.c:597 0x80cfb51f:0x00000000)
> > 03-15 11:41:28.069: WARN/System.err(1312):     at
> >
> org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.nativeconnect(Native
> > Method)
> > 03-15 11:41:28.069: WARN/System.err(1312):     at
> >
> org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:305)
> > 03-15 11:41:28.069: WARN/System.err(1312):     at
> >
> org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.getSecureSocket(HttpConnection.java:168)
> > 03-15 11:41:28.070: WARN/System.err(1312):     at
> >
> org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnection$HttpsEngine.connect(HttpsURLCon...)
> > 03-15 11:41:28.070: WARN/System.err(1312):     at
> >
> org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnection.connect(HttpsURLConnection.java...)
> > 03-15 11:41:28.091: WARN/System.err(1312):     at
> >
> com.android.proxytest.HttpProxyTest.javaHttpsRequest(HttpProxyTest.java:354)
> > 03-15 11:41:28.092: WARN/System.err(1312):     at
> > com.android.proxytest.HttpProxyTest.access$800(HttpProxyTest.java:49)
> > 03-15 11:41:28.092: WARN/System.err(1312):     at
> > com.android.proxytest.HttpProxyTest$8$1.run(HttpProxyTest.java:163)
> > 03-15 11:41:28.092: WARN/System.err(1312):     at
> > java.lang.Thread.run(Thread.java:1096)
> >
> > This issue is there in both in eclair as well as froyo.
> >
> > Thanks
> > Swapnil
>
> --
> 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




-- 
Swapnil

-- 
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