JDK1.5 and JSSE provider question
Hi !
I'm trying to work with the IBM JSSE provider and the Sun JDK1.5 but it seems harder than expected. Of course I checked the policy and security files and it's ok to me, as well as the classpath.
I get an Exception and I don't understand why.
here is my code, and the runtime result :
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocketFactory;
import java.security.*;
import com.ibm.jsse.IBMJSSEProvider;
public class TestJCE {
public static void main(String[] args) {
TrustManager[] trustAllCerts = new TrustManager[]{
new X509TrustManager() {
public boolean checkClientTrusted(java.security.cert.X509Certificate[] chain){
return true;
}
public boolean isServerTrusted(java.security.cert.X509Certificate[] chain){
return true;
}
public boolean isClientTrusted(java.security.cert.X509Certificate[] chain){
return true;
}
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
return null;
}
public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) {}
public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) {}
}
};
try {
System.out.println(System.getProperty("java.home"));
Provider pro = new com.ibm.jsse.IBMJSSEProvider();
System.out.println(pro.getName());
System.out.println(pro.getVersion());
System.out.println(pro.getInfo());
Security.addProvider(new com.ibm.jsse.IBMJSSEProvider());
SSLContext sc = SSLContext.getInstance("SSL", "IBMJSSE");
sc.init(null, trustAllCerts, new java.security.SecureRandom());
SSLSocketFactory factory = sc.getSocketFactory();
}
catch(java.security.NoSuchProviderException nspe) {
System.out.println(nspe);
}
catch(java.security.NoSuchAlgorithmException nsae) {
System.out.println(nsae);
}
catch(java.security.KeyManagementException kme) {
System.out.println(kme);
}
}
}
==========================
C:\Program Files\Java\jre1.5.0_03
IBMJSSE
1.42
IBM JSSE provider
export control - checking the cipher suites
export control - no cached value available...
export control - illegal CS SSL_DHE_DSS_WITH_RC4_128_SHA
export control - storing illegal entry into cache...
Exception in thread "main" java.lang.RuntimeException: Export restriction: SSLSo
cketFactory supports non-pluggable ciphersuite(s)
at com.sun.net.ssl.internal.ssl.ExportControl.checkCipherSuites(Unknown
Source)
at javax.net.ssl.SSLContext.getSocketFactory(Unknown Source)
at TestJCE.main(TestJCE.java:39)
could anyone help please ?

