Resend: Java Sun JDK 1.4.1_07 client connecting to SSL server using OpenSSL 9.8a problems

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Resend: Java Sun JDK 1.4.1_07 client connecting to SSL server using OpenSSL 9.8a problems

AServito




Is this the right newsgroup to send this question?

Thanks.








Can someone help us out why we are having the connection problem?  Searched
the internet for answer and it seems to me that the problem is in the
protocol level.


In the Java client running under Sun JVM windows version we have the
following code.

         SSLSocketFactory sslsocketfactory =
         (SSLSocketFactory)SSLSocketFactory.getDefault();
         SSLSocket sslSocket = (SSLSocket)sslsocketfactory.createSocket();

         String protocols[] = {"SSLv3", "TLSv1"};
         sslSocket.setEnabledProtocols(protocols);

         InetAddress anInetAddress = InetAddress.getByName(host);
         SocketAddress aSocketAddress = new
         InetSocketAddress(anInetAddress, port);
         sslSocket.connect(aSocketAddress, timeout);
         sslSocket.startHandshake();

Getting following error/exceptions:

(1) Exception when the following using the default protocol Sun uses

         String protocols[] = {"SSLv3", "TLSv1"};
         sslSocket.setEnabledProtocols(protocols);


javax.net.ssl.SSLHandshakeException: Remote host closed connection during
handshake
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
      at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
      at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA12275)

(2) Exception when using the code above setting protocol to SSLv3",
"TLSv1"}and using bouncy castle.

      (a) java.lang.NoClassDefFoundError
            at javax.crypto.Cipher.a(DashoA6275)
            at javax.crypto.Cipher.getInstance(DashoA6275)
            at com.sun.net.ssl.internal.ssl.SunJSSE_i.a(DashoA12275)
            at com.sun.net.ssl.internal.ssl.SunJSSE_bk.<init>(DashoA12275)
            at com.sun.net.ssl.internal.ssl.SunJSSE_bj.a(DashoA12275)
            at com.sun.net.ssl.internal.ssl.SunJSSE_be.<init>(DashoA12275)
            at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
            at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
            at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
            at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
            at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
            at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA12275)


      (b) javax.net.ssl.SSLException: Received fatal alert: bad_record_mac
            at
com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA12275)
            at
com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.b(DashoA12275)
            at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA12275)
            at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
            at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
            at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA12275)



Thank you in advance!


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]



______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Resend: Java Sun JDK 1.4.1_07 client connecting to SSL server using OpenSSL 9.8a problems

Dr. Stephen Henson
On Mon, Nov 28, 2005, [hidden email] wrote:

>
> Is this the right newsgroup to send this question?
>

Since the Sun Java SSL/TLS implementation has nothing to do with OpenSSL no it
isn't...

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]