Sun JSSE vs Bouncy Castle key error : bad handshake record MAC
843811Sep 2 2003 — edited Feb 5 2005Hi
My configuration:
Sun JSSE from j2sdk1.4.0_01
Bouncy Castle bcprov-jdk14-117
My test:
I modified the ClassFileServer sample to generate a key pair
and a server certificate on server startup.
I use the Bouncy Castle provider to create the key pair:
-> KeyPairGenerator.getInstance("RSA","BC");
When the server is running, I connect an I.E. to the server
with an https url and 70% of the tests fails :
javax.net.ssl.SSLHandshakeException: bad handshake record MAC
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.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(DashoA6275)
at sun.nio.cs.StreamDecoder$CharsetSD.readBytesStreamDecoder.java:404)
....
When I use a Sun provider to create the key pair
-> KeyPairGenerator.getInstance("RSA","SunJSSE")
the server always works.