RSA Premaster Secret Error, JDK 1.5.0_01 (simple test case)

Hello,

I still didn't find a solution to workaround exception on establishing SSH connection with some web servers. Below is the most simple code that throws exception:

try{

URL url =new URL("https://svn.apache.org/repos/asf");

HttpsURLConnection connection =

(HttpsURLConnection) url.openConnection();

connection.connect();

connection.disconnect();

}catch (MalformedURLException mue){

mue.printStackTrace(System.out);

}catch (IOException ie){

ie.printStackTrace(System.out);

}

If you add svn.apache.org certifcate into your truststore (cacerts file) then you will get an "RSA premaster secret error" exception when running the code above.

Any ideas how to fix this problem?

Thanks,

Alexander Kitaev.

[1124 byte] By [oka801a] at [2007-10-1 1:11:21]
# 1
see also http://forum.java.sun.com/thread.jspa?threadID=567433 and http://forum.java.sun.com/thread.jspa?threadID=581431
ralfhausera at 2007-7-8 1:28:12 > top of Java-index,Security,Java Secure Socket Extension (JSSE)...