EOFException & SSLHandshakeException
843811Sep 8 2004 — edited Dec 19 2005Hi,
I am trying to connect to an ldap server via ssl
I get this message:
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
main, called closeSocket()
Anyone has got any idea? Bear in mind this is the first time I try this thing so go easy on me, please ;-)
------- Full debug log and exception -----
keyStore is :
keyStore type is : jks
init keystore
init keymanager of type SunX509
trustStore is: c:\java\j2sdk1.4.2_04\bin\edwscerts
trustStore type is : jks
init truststore
adding as trusted cert:
Subject: CN=PricewaterhouseCoopers Policy, DC=pwc, DC=com
Issuer: CN=PricewaterhouseCoopers Root, DC=pwc, DC=com
Algorithm: RSA; Serial number: 0x13d42607000000000002
Valid from Thu Jan 15 21:06:55 GMT 2004 until Wed Jan 15 21:16:55 GMT 2014
adding as trusted cert:
Subject: CN=PricewaterhouseCoopers Root, DC=pwc, DC=com
Issuer: CN=PricewaterhouseCoopers Root, DC=pwc, DC=com
Algorithm: RSA; Serial number: 0x3f9c512cba7decae4e7b51454a2edc09
Valid from Thu Jan 15 20:54:48 GMT 2004 until Mon Jan 15 21:02:51 GMT 2024
adding as trusted cert:
Subject: CN=PricewaterhouseCoopers Issuing1, DC=pwc, DC=com
Issuer: CN=PricewaterhouseCoopers Policy, DC=pwc, DC=com
Algorithm: RSA; Serial number: 0x13e2a286000000000003
Valid from Thu Jan 15 21:24:00 GMT 2004 until Thu Jan 15 21:34:00 GMT 2009
adding as trusted cert:
Subject: CN=uk-londirlc01.ema.pwcinternal.com, OU=PricewaterhouseCoopers LLP, O=LM01, L=Tampa, ST=Florida, C=US
Issuer: CN=PricewaterhouseCoopers Issuing1, DC=pwc, DC=com
Algorithm: RSA; Serial number: 0x11e26de1000000001eaf
Valid from Mon Aug 02 14:18:13 BST 2004 until Wed Aug 02 14:28:13 BST 2006
init context
trigger seeding of SecureRandom
done seeding SecureRandom
%% No cached client session
*** ClientHello, TLSv1
RandomCookie: GMT: 1094568732 bytes = { 130, 28, 252, 246, 170, 27, 224, 250, 31, 97, 109, 135, 112, 133, 249, 41, 99, 162, 89, 199, 8, 118, 167, 249, 90, 36, 118, 149 }
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 41 3E CB 1C 82 1C FC F6 AA 1B ...E..A>........
0010: E0 FA 1F 61 6D 87 70 85 F9 29 63 A2 59 C7 08 76 ...am.p..)c.Y..v
0020: A7 F9 5A 24 76 95 00 00 1E 00 04 00 05 00 2F 00 ..Z$v........./.
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 41 3E CB 1C 82 1C FC F6 AA 1B E0 FA 1F 61 ..A>...........a
0050: 6D 87 70 85 F9 29 63 A2 59 C7 08 76 A7 F9 5A 24 m.p..)c.Y..v..Z$
0060: 76 95 v.
main, WRITE: SSLv2 client hello message, length = 98
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
main, called closeSocket()
javax.naming.CommunicationException: simple bind failed: uk-londirlc01.ema.pwcinternal.com:636 [Root exception is javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake]
at com.sun.jndi.ldap.LdapClient.authenticate(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.connect(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.<init>(Unknown Source)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(Unknown Source)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(Unknown Source)
at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(Unknown Source)
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(Unknown Source)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at javax.naming.directory.InitialDirContext.<init>(Unknown Source)
at com.pwc.aim.ws.ed.locators.implementations.LocalLocatorMethods.getLDAPInitialContext(LocalLocatorMethods.java:63)
at com.pwc.aim.ws.ed.junit.FacadeSearchTest.testSearch(FacadeSearchTest.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.flush(Unknown Source)
at com.sun.jndi.ldap.Connection.writeRequest(Unknown Source)
at com.sun.jndi.ldap.LdapClient.ldapBind(Unknown Source)
... 29 more
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
... 37 more