code below HTTP (API version 7 and 8) and work with HTTPS (API version 7). For HTTPS (API version 8) I get the error "java.io.IOException: SSL handshake failure: failure in SSL library, usually a protocol error"?
Any idea why version 8 alone
code ...
HttpURL connection = null; BuffettDrider BRD = Faucet; String line = ""; Stringbilder sb = new stringbiller (); Try to set {// initial connection // connection = (Acteepiaruarkyuensi) new URL ( "http://MYSERVER.com"). OpenConnection (); // Works Connection = (HttpURLConnection) New URL ("https://MYSERVER.com") OpenConnection (); // error connection.connect (); Brd = new BufferedReader (new InputStreamReader (connection.getInputStream ())); Sb = new stringbilder (); While ((line = Brodkredlain ())! = Null Sbkappend (line); Println (sb.toString ());} catch (IOException e) {e.printStackTrace ();} finally {// connection off, set for all items minus connection. disconnect (); Brd = null; Sb = null; connection = null;} full error stack
Warning / System.err (267): java.io.IOException: SSL handshake failure: failure in SSL library, usually a protocol error warning / System.err (267): error: L40773F2: SSL routines: SSL23_GET_SERVER_HELLO: SSLv3 warning Apa Expected Message (External / openssl / ssl / s23_clnt.c: 599 0xaf076ad8: 0x00000000) org.apache.harmony.xnet.provider at jsse.OpenSSLSocketImpl.nativeconnect org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake ( OpenSSLSocketImpl.java:316) at (Native method) org.apache.harmony.luni.internal .HttpConnection.getSecureSocket (HttpConnection.java:168) on org.apache.harmony.luni.internal.net.www.protocol.http .net.www.protocol.https.HttpsURLConnectionImpl $ HttpsEngine.connect (HttpsURLConnectionImpl.java:399) .internal.net.www.protocol.https.HttpsURLConnectionImpl.connect on org.apache.harmony.luni (HttpsURLConnectionImpl.java:147 )
thanks, Narayanan
Comments
Post a Comment