Received fatal alert: bad_record_mac
843811Feb 12 2003 — edited Jun 3 2003Hi
I got the following problem when i am trying to connect to remote server using sslsocket
I am using j2sdk1.4.0 on sun solaris.
When i tried to execute the following code with KeyStore option and password it is working. But when i tried to execute without the keystore option i got the following error.
This is the code:
----------------
SSLSocketFactory factory =(SSLSocketFactory)SSLSocketFactory.getDefault();
SSLSocket socket =(SSLSocket)factory.createSocket("www.verisign.com", 443);
socket.startHandshake();
....
Command with key store option:(no problem with this option)
----------------------------------------------------------
1)java -Djavax.net.ssl.keyStore=/ora/keystore/keystore -Djavax.net.ssl.keyStorePassword=changeit SSLSocketServer
i was able to connect
command without keystore option(problem existed with option)
--------------------------------------------------
2)java SSLSocketServer
Error:
------
javax.net.ssl.SSLException: Received fatal alert: bad_record_mac
javax.net.ssl.SSLException: Received fatal alert: bad_record_mac
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275)
at java.io.OutputStream.write(OutputStream.java:58)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)
at SSLSocketClient.main(SSLSocketClient.java:24)