Hi,
How can I use ciper "TLS_RSA_WITH_3DES_EDE_CBC_SHA" in my ssl program?
package com.test;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
/**
*
* @author balaji
*/
public class SSLWithServerCert1 {
public static void main(String[] args) throws Exception {
System.setProperty("javax.net.debug", "all");
System.setProperty("https.cipherSuites", "TLS_RSA_WITH_3DES_EDE_CBC_SHA");
System.setProperty("javax.net.ssl.trustStore", "C:\\Temp\\work\\netbeans_prj\\FIPSDemo\\src\\com\\cert\\truststore");
URL site = new URL("https://wac-test1-v1/FIPSDemo/index.htm");
BufferedReader in = new BufferedReader(
new InputStreamReader(
site.openStream()));
String inputLine;
while ((inputLine = in.readLine()) != null) {
System.out.println(inputLine);
}
in.close();
}
}
The above programm is failing with error.
Exception in thread "main" java.lang.IllegalArgumentException: Unsupported ciphersuite TLS_RSA_WITH_3DES_EDE_CBC_SHA
at com.sun.net.ssl.internal.ssl.CipherSuite.valueOf(CipherSuite.java:171)
at com.sun.net.ssl.internal.ssl.CipherSuiteList.<init>(CipherSuiteList.java:62)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.setEnabledCipherSuites(SSLSocketImpl.java:1911)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:399)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:170)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:938)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
at java.net.URL.openStream(URL.java:1007)
at com.test.SSLWithServerCert1.main(SSLWithServerCert1.java:26)
Thanks in advance
Balaji