Hi Oleg,
may I raise this issue again ?
> > > Gerd
> > >
> > > This looks like a SSL protocol compatibility issue. Try using a
> > > different version of the protocol (SSLv1 or TLSv1) and see if that
makes
> > > any difference.
I have now found out the correct protocol version (TLSv1) and succeed to
connect to
this server using WGET and CURL both. Still no luck with Apache HTTP.
Could you please take look to this stack and debug trace ?
....
trigger seeding of SecureRandom
done seeding SecureRandom
executing requestGET https://192.168.111.56/cgi-bin/read.xml?Meter.
HTTP/1.1
%% No cached client session
*** ClientHello, TLSv1
RandomCookie: GMT: 1292592736 bytes = { 66, 152, 166, 225, 89, 90, 205,
180, 21, 195, 3, 125, 219, 61, 94, 128, 39, 163, 28, 157, 180, 60, 43,
245, 218, 159, 255, 219 }
Session ID: {}
Cipher Suites: [SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA,
TLS_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
TLS_DHE_DSS_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA,
SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA,
SSL_RSA_WITH_DES_CBC_SHA, SSL_DHE_RSA_WITH_DES_CBC_SHA,
SSL_DHE_DSS_WITH_DES_CBC_SHA, SSL_RSA_EXPORT_WITH_RC4_40_MD5,
SSL_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA,
SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA]
Compression Methods: { 0 }
***
[write] MD5 and SHA1 hashes: len = 73
0000: 01 00 00 45 03 01 4D 0B 66 60 42 98 A6 E1 59 5A ...E..M.f`B...YZ
0010: CD B4 15 C3 03 7D DB 3D 5E 80 27 A3 1C 9D B4 3C .......=^.'....<
0020: 2B F5 DA 9F FF DB 00 00 1E 00 04 00 05 00 2F 00 +............./.
0030: 33 00 32 00 0A 00 16 00 13 00 09 00 15 00 12 00 3.2.............
0040: 03 00 08 00 14 00 11 01 00 .........
main, WRITE: TLSv1 Handshake, length = 73
[write] MD5 and SHA1 hashes: len = 98
0000: 01 03 01 00 39 00 00 00 20 00 00 04 01 00 80 00 ....9... .......
0010: 00 05 00 00 2F 00 00 33 00 00 32 00 00 0A 07 00 ..../..3..2.....
0020: C0 00 00 16 00 00 13 00 00 09 06 00 40 00 00 15 ............@...
0030: 00 00 12 00 00 03 02 00 80 00 00 08 00 00 14 00 ................
0040: 00 11 4D 0B 66 60 42 98 A6 E1 59 5A CD B4 15 C3 ..M.f`B...YZ....
0050: 03 7D DB 3D 5E 80 27 A3 1C 9D B4 3C 2B F5 DA 9F ...=^.'....<+...
0060: FF DB ..
main, WRITE: SSLv2 client hello message, length = 98
[Raw write]: length = 100
0000: 80 62 01 03 01 00 39 00 00 00 20 00 00 04 01 00 .b....9... .....
0010: 80 00 00 05 00 00 2F 00 00 33 00 00 32 00 00 0A ....../..3..2...
0020: 07 00 C0 00 00 16 00 00 13 00 00 09 06 00 40 00 ..............@.
0030: 00 15 00 00 12 00 00 03 02 00 80 00 00 08 00 00 ................
0040: 14 00 00 11 4D 0B 66 60 42 98 A6 E1 59 5A CD B4 ....M.f`B...YZ..
0050: 15 C3 03 7D DB 3D 5E 80 27 A3 1C 9D B4 3C 2B F5 .....=^.'....<+.
0060: DA 9F FF DB ....
main, received EOFException: error
main, handling exception: javax.net.ssl.SSLHandshakeException: Remote host
closed connection during handshake
main, SEND TLSv1 ALERT: fatal, description = handshake_failure
main, WRITE: TLSv1 Alert, length = 2
[Raw write]: length = 7
0000: 15 03 01 00 02 02 28 ......(
main, called closeSocket()
main, IOException in getSession(): javax.net.ssl.SSLHandshakeException:
Remote host closed connection during handshake
main, called close()
main, called closeInternal(true)
Exception in thread "main" javax.net.ssl.SSLPeerUnverifiedException: peer
not authenticated
at
com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificates(Unknown
Source)
at org.apache.http.conn.ssl.AbstractVerifier.verify(
AbstractVerifier.java:128)
at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(
SSLSocketFactory.java:391)
at
org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(
DefaultClientConnectionOperator.java:148)
at org.apache.http.impl.conn.AbstractPoolEntry.open(
AbstractPoolEntry.java:149)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(
AbstractPooledConnAdapter.java:121)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(
DefaultRequestDirector.java:562)
at org.apache.http.impl.client.DefaultRequestDirector.execute(
DefaultRequestDirector.java:415)
at org.apache.http.impl.client.AbstractHttpClient.execute(
AbstractHttpClient.java:700)
at org.apache.http.impl.client.AbstractHttpClient.execute(
AbstractHttpClient.java:625)
at org.apache.http.impl.client.AbstractHttpClient.execute(
AbstractHttpClient.java:603)
at ClientTrustManager.main(ClientTrustManager.java:56)
Looks like a server problem with Remote host closed connection during
handshake. But why then do WGET and CURL work ?
I have set socket and connect times long enough (30sec) as the server on
the other side is an embedded linux device and
therefore is not that fast.
If you still would be able to investigate in depth could you please come
to me via mailto:[email protected] for arranging
more details ?
Thx, regards
Gerd
The information included in this e-mail and any files transmitted with it is
strictly confidential and may be privileged or otherwise protected from
disclosure. If you are not the intended recipient, please notify the sender
immediately by e-mail and delete this e-mail as well as any attachment from
your system. If you are not the intended recipient you are not authorized to
use and/or copy this message and/or attachment and/or disclose the contents to
any other person.