Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

openjdk11 : Unsupported CipherSuite Exception

My app is using OpenJDK 11 and fails with the following exception:

Caused by: java.lang.IllegalArgumentException: Unsupported CipherSuite: SSL_RSA_WITH_AES_256_CBC_SHA256
        at java.base/sun.security.ssl.CipherSuite.validValuesOf(CipherSuite.java:916)
        at java.base/sun.security.ssl.SSLSocketImpl.setEnabledCipherSuites(SSLSocketImpl.java:302)
        at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection.makeSocketSecure(RemoteTCPConnection.java:2084)

I am not sharing any code because I don't think the problem is there. I need to fix this exception somehow.

Is it possible to configure JRE to support this particular CipherSuite?

like image 602
ikos23 Avatar asked Feb 16 '26 05:02

ikos23


1 Answers

Generally TLS_RSA_... not SSL_RSA_... in recent Java versions as SSLv3 is no longer secure.

IBM JRE might supports SSL_RSA_WITH_AES_256_CBC_SHA256 cipher suite as per Configuring your application to use IBM Java or Oracle Java CipherSuite mappings docs but this is not a valid constant in OpenJDK.

The TLS_RSA_WITH_AES_256_CBC_SHA256 cipher suite was introduced in Java 7 as per Java Cryptography Architecture Oracle Providers Documentation for JDK 8 docs. Use this constant in OpenJDK.

like image 146
Karol Dowbecki Avatar answered Feb 17 '26 19:02

Karol Dowbecki



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!