简体   繁体   中英

IllegalArgumentException: Unsupported ciphersuite

For application client running in WAS 8.5 we have code creating socket that fails with an error below.

    SSLSocketFactory factory = (SSLSocketFactory) SSLSocketFactory.getDefault();
    SSLSocket socket = (SSLSocket) factory.createSocket();
    String pickedCipher[] = {"TLS_DHE-RSA-AES128-SHA256"};
    socket.setEnabledCipherSuites(pickedCipher);
    String[] protocols = socket.getEnabledProtocols();

log:

java.lang.IllegalArgumentException: Unsupported ciphersuite SSL_DHE-RSA-AES128-SHA256 at com.ibm.jsse2.ra(r.java:245) at com.ibm.jsse2.s.(s.java:51) at com.ibm.jsse2.SSLSocketImpl.setEnabledCipherSuites(SSLSocketImpl.java:186)

Any ideas?

Here is a list of supported ciphersuite in Java - http://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html

TLS_DHE_RSA_WITH_AES_128_CBC_SHA

TLS_DHE_RSA_WITH_AES_128_CBC_SHA256

TLS_DHE_RSA_WITH_AES_128_GCM_SHA256

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM