Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

JSSE Using cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA

843811May 7 2009 — edited May 12 2009
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 9 2009
Added on May 7 2009
10 comments
6,476 views